hotspot/src/share/vm/memory/generation.cpp
Generation::Generation(ReservedSpace rs, size_t initial_size, int level) :
{- -------------------------------------------
(1) フィールドの初期化
---------------------------------------- -}
_level(level),
_ref_processor(NULL) {
{- -------------------------------------------
(1) VirtualSpace::initialize() を呼んで,
対応するメモリ領域を commmit する.
(commit が失敗したら, ここで異常終了させる)
---------------------------------------- -}
if (!_virtual_space.initialize(rs, initial_size)) {
vm_exit_during_initialization("Could not reserve enough space for "
"object heap");
}
{- -------------------------------------------
(1) (デバッグ用の処理) (関連する develop オプションが指定されている場合にのみ実行) (See: ZapUnusedHeapArea)
---------------------------------------- -}
// Mangle all of the the initial generation.
if (ZapUnusedHeapArea) {
MemRegion mangle_region((HeapWord*)_virtual_space.low(),
(HeapWord*)_virtual_space.high());
SpaceMangler::mangle_region(mangle_region);
}
{- -------------------------------------------
(1) フィールドの初期化
---------------------------------------- -}
_reserved = MemRegion((HeapWord*)_virtual_space.low_boundary(),
(HeapWord*)_virtual_space.high_boundary());
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.