< prev index next >

src/hotspot/share/gc/shared/memAllocator.cpp

Print this page
*** 380,12 ***
    Copy::fill_to_aligned_words(mem + hs, _word_size - hs);
  }
  
  oop MemAllocator::finish(HeapWord* mem) const {
    assert(mem != NULL, "NULL object pointer");
!   // May be bootstrapping
-   oopDesc::set_mark(mem, markWord::prototype());
    // Need a release store to ensure array/class length, mark word, and
    // object zeroing are visible before setting the klass non-NULL, for
    // concurrent collectors.
    oopDesc::release_set_klass(mem, _klass);
    return cast_to_oop(mem);
--- 380,11 ---
    Copy::fill_to_aligned_words(mem + hs, _word_size - hs);
  }
  
  oop MemAllocator::finish(HeapWord* mem) const {
    assert(mem != NULL, "NULL object pointer");
!   oopDesc::set_mark(mem, Klass::default_prototype_header(_klass));
    // Need a release store to ensure array/class length, mark word, and
    // object zeroing are visible before setting the klass non-NULL, for
    // concurrent collectors.
    oopDesc::release_set_klass(mem, _klass);
    return cast_to_oop(mem);

*** 394,10 ***
--- 393,16 ---
  oop ObjAllocator::initialize(HeapWord* mem) const {
    mem_clear(mem);
    return finish(mem);
  }
  
+ oop ObjBufferAllocator::initialize(HeapWord* mem) const {
+   oopDesc::set_klass_gap(mem, 0);
+   return finish(mem);
+ }
+ 
+ 
  MemRegion ObjArrayAllocator::obj_memory_range(oop obj) const {
    if (_do_zero) {
      return MemAllocator::obj_memory_range(obj);
    }
    ArrayKlass* array_klass = ArrayKlass::cast(_klass);
< prev index next >