次に、-verbosegc -verbosegc の出力例を検討します。
Gen0(semi-spaces): size=4096kb, free=0kb, maxAlloc=0kb From space: size=524288 words, used=524286 words, free=2 To space: size=524288 words, used=1 words, free=524287 Gen0(semi-spaces)-GC #4 tenure-thresh=0 61ms 0%->28% free Gen0(semi-spaces): size=4096kb, free=571kb, maxAlloc=571kb From space: size=524288 words, used=378157 words, free=146131 To space: size=524288 words, used=1 words, free=524287 Gen1(mark-compact): size=4096kb, free=0kb, maxAlloc=0kb Gen1(mark-compact)-GC #1 Gen1: 850kb dense 262ms 0%->2% free Gen1(mark-compact): size=4096kb, free=80kb, maxAlloc=80kb |
この出力からは、それぞれの世代について以下の情報を得ることができます。
Gen0 は、ガベージコレクタをコピーする、4096K バイトから始まる semi-space です。この新しい空間のガベージコレクション以前には、未使用メモリのサイズは 0K バイトでした。ガベージコレクション以後には、378157 ワード分が未使用になっています (28%)。Gen1 は mark-compact のガベージコレクタです。回収中に 2% が解放されています。
詳しい情報が得られる、-verbosegc -verbosegc -verbosegc モードもあります。