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 |