< prev index next > src/hotspot/share/gc/shared/memAllocator.cpp
Print this page
Copy::fill_to_aligned_words(mem + hs, _word_size - hs);
}
oop MemAllocator::finish(HeapWord* mem) const {
assert(mem != nullptr, "null object pointer");
- // May be bootstrapping
- oopDesc::set_mark(mem, markWord::prototype());
+ 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);
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);
+ }
+
+
oop ObjArrayAllocator::initialize(HeapWord* mem) const {
// Set array length before setting the _klass field because a
// non-null klass field indicates that the object is parsable by
// concurrent GC.
assert(_length >= 0, "length should be non-negative");
< prev index next >