hotspot/src/share/vm/gc_implementation/parallelScavenge/adjoiningVirtualSpaces.cpp
// The maximum byte sizes are for the initial layout of the
// virtual spaces and are not the limit on the maximum bytes sizes.
void AdjoiningVirtualSpaces::initialize(size_t max_low_byte_size,
size_t init_low_byte_size,
size_t init_high_byte_size) {
{- -------------------------------------------
(1) 各世代に対応する ReservedSpace を取得する.
---------------------------------------- -}
// The reserved spaces for the two parts of the virtual space.
ReservedSpace old_rs = _reserved_space.first_part(max_low_byte_size);
ReservedSpace young_rs = _reserved_space.last_part(max_low_byte_size);
{- -------------------------------------------
(1) 取得した ReservedSpace を元に
PSVirtualSpace オブジェクトと PSVirtualSpaceHighToLow オブジェクトを作成し,
それぞれ PSVirtualSpace::expand_by() と PSVirtualSpaceHighToLow::expand_by() で
初期サイズ分の仮想メモリ空間を commit する.
expand_by() が失敗したら, ここで異常終了.
---------------------------------------- -}
_low = new PSVirtualSpace(old_rs, alignment());
if (!_low->expand_by(init_low_byte_size)) {
vm_exit_during_initialization("Could not reserve enough space for "
"object heap");
}
_high = new PSVirtualSpaceHighToLow(young_rs, alignment());
if (!_high->expand_by(init_high_byte_size)) {
vm_exit_during_initialization("Could not reserve enough space for "
"object heap");
}
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.