1.1 --- a/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp Mon Oct 01 13:29:11 2012 +0200 1.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp Wed Oct 03 08:08:52 2012 -0700 1.3 @@ -395,9 +395,13 @@ 1.4 1.5 GCTaskQueue* q = GCTaskQueue::create(); 1.6 1.7 - uint stripe_total = active_workers; 1.8 - for(uint i=0; i < stripe_total; i++) { 1.9 - q->enqueue(new OldToYoungRootsTask(old_gen, old_top, i, stripe_total)); 1.10 + if (!old_gen->object_space()->is_empty()) { 1.11 + // There are only old-to-young pointers if there are objects 1.12 + // in the old gen. 1.13 + uint stripe_total = active_workers; 1.14 + for(uint i=0; i < stripe_total; i++) { 1.15 + q->enqueue(new OldToYoungRootsTask(old_gen, old_top, i, stripe_total)); 1.16 + } 1.17 } 1.18 1.19 q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::universe));