--- old/src/share/vm/memory/space.cpp 2014-10-17 16:28:48.000000000 +0200 +++ new/src/share/vm/memory/space.cpp 2014-10-17 16:28:48.000000000 +0200 @@ -389,7 +389,7 @@ cp->space->set_compaction_top(compact_top); cp->space = cp->space->next_compaction_space(); if (cp->space == NULL) { - cp->gen = GenCollectedHeap::heap()->prev_gen(cp->gen); + cp->gen = GenCollectedHeap::heap()->young_gen(); assert(cp->gen != NULL, "compaction must succeed"); cp->space = cp->gen->first_compaction_space(); assert(cp->space != NULL, "generation must have a first compaction space");