< prev index next >
src/hotspot/share/gc/shared/collectedHeap.inline.hpp
Print this page
*** 43,53 ****
void CollectedHeap::post_allocation_setup_common(Klass* klass,
HeapWord* obj_ptr) {
post_allocation_setup_no_klass_install(klass, obj_ptr);
oop obj = (oop)obj_ptr;
! #if ! INCLUDE_ALL_GCS
obj->set_klass(klass);
#else
// 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.
--- 43,53 ----
void CollectedHeap::post_allocation_setup_common(Klass* klass,
HeapWord* obj_ptr) {
post_allocation_setup_no_klass_install(klass, obj_ptr);
oop obj = (oop)obj_ptr;
! #if ! (INCLUDE_G1GC || INCLUDE_CMSGC)
obj->set_klass(klass);
#else
// 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.
< prev index next >