6898857: [Regression] -XX:NewRatio with -XX:+UseConcMarkSweepGC causes fatal error
authorjmasa
Tue, 10 Nov 2009 11:32:48 -0800
changeset 4455 3f46ab998f18
parent 4454 d27c981064b4
child 4456 fa02c2ef7a70
6898857: [Regression] -XX:NewRatio with -XX:+UseConcMarkSweepGC causes fatal error Summary: Use CollectorPolicy information instead of MaxNewSize Reviewed-by: ysr, jcoomes
hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Fri Nov 06 11:10:05 2009 -0800
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Tue Nov 10 11:32:48 2009 -0800
@@ -709,7 +709,8 @@
 
   // Support for parallelizing survivor space rescan
   if (CMSParallelRemarkEnabled && CMSParallelSurvivorRemarkEnabled) {
-    size_t max_plab_samples = MaxNewSize/((SurvivorRatio+2)*MinTLABSize);
+    size_t max_plab_samples = cp->max_gen0_size()/
+                                ((SurvivorRatio+2)*MinTLABSize);
     _survivor_plab_array  = NEW_C_HEAP_ARRAY(ChunkArray, ParallelGCThreads);
     _survivor_chunk_array = NEW_C_HEAP_ARRAY(HeapWord*, 2*max_plab_samples);
     _cursor               = NEW_C_HEAP_ARRAY(size_t, ParallelGCThreads);