Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/genCollectedHeap.cpp @ 20295:3f2894c5052e
8048112: G1 Full GC needs to support the case when the very first region is not available
Summary: Refactor preparation for compaction during Full GC so that it lazily initializes the first compaction point. This also avoids problems later when the first region may not be committed. Also reviewed by K. Barrett.
Reviewed-by: brutisso
author | tschatzl |
---|---|
date | Mon, 21 Jul 2014 10:00:31 +0200 |
parents | 2c6ef90f030a |
children | 439f0d76cff3 4bfc44ba0d19 |
comparison
equal
deleted
inserted
replaced
20294:dd219eaec9cc | 20295:3f2894c5052e |
---|---|
1097 | 1097 |
1098 void GenCollectedHeap::prepare_for_compaction() { | 1098 void GenCollectedHeap::prepare_for_compaction() { |
1099 guarantee(_n_gens = 2, "Wrong number of generations"); | 1099 guarantee(_n_gens = 2, "Wrong number of generations"); |
1100 Generation* old_gen = _gens[1]; | 1100 Generation* old_gen = _gens[1]; |
1101 // Start by compacting into same gen. | 1101 // Start by compacting into same gen. |
1102 CompactPoint cp(old_gen, NULL, NULL); | 1102 CompactPoint cp(old_gen); |
1103 old_gen->prepare_for_compaction(&cp); | 1103 old_gen->prepare_for_compaction(&cp); |
1104 Generation* young_gen = _gens[0]; | 1104 Generation* young_gen = _gens[0]; |
1105 young_gen->prepare_for_compaction(&cp); | 1105 young_gen->prepare_for_compaction(&cp); |
1106 } | 1106 } |
1107 | 1107 |