hotspot/src/share/vm/gc_interface/collectedHeap.inline.hpp
void CollectedHeap::init_obj(HeapWord* obj, size_t size) {
{- -------------------------------------------
(1) (変数宣言など)
---------------------------------------- -}
assert(obj != NULL, "cannot initialize NULL object");
const size_t hs = oopDesc::header_size();
assert(size >= hs, "unexpected object size");
{- -------------------------------------------
(1) #TODO
---------------------------------------- -}
((oop)obj)->set_klass_gap(0);
{- -------------------------------------------
(1) Copy::fill_to_aligned_words() で, ヘッダー部を除いた部分を 0 クリアする
---------------------------------------- -}
Copy::fill_to_aligned_words(obj + hs, size - hs);
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.