hotspot/src/share/vm/gc_implementation/parallelScavenge/psYoungGen.cpp
void PSYoungGen::swap_spaces() {
{- -------------------------------------------
(1) _from_space と _to_space の値を入れ替える.
---------------------------------------- -}
MutableSpace* s = from_space();
_from_space = to_space();
_to_space = s;
{- -------------------------------------------
(1) ついでに, _from_mark_sweep と _to_mark_sweep の値も入れ替える.
---------------------------------------- -}
// Now update the decorators.
PSMarkSweepDecorator* md = from_mark_sweep();
_from_mark_sweep = to_mark_sweep();
_to_mark_sweep = md;
{- -------------------------------------------
(1) (assert)
---------------------------------------- -}
assert(from_mark_sweep()->space() == from_space(), "Sanity");
assert(to_mark_sweep()->space() == to_space(), "Sanity");
}
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.