8023643: G1 assert failed when NewSize was specified greater than MaxNewSize
authorjwilhelm
Sat, 12 Oct 2013 00:49:19 +0200
changeset 20721 b134465e8682
parent 20720 b03e2f7796a7
child 20722 30d37a833bc7
child 20723 929cc8568f8e
8023643: G1 assert failed when NewSize was specified greater than MaxNewSize Summary: Exit with an error if incompatible NewSize and MaxNeSize are set Reviewed-by: brutisso, tschatzl
hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Sat Oct 12 05:08:42 2013 +0000
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Sat Oct 12 00:49:19 2013 +0200
@@ -344,6 +344,10 @@
     }
   }
 
+  if (FLAG_IS_CMDLINE(NewSize) && FLAG_IS_CMDLINE(MaxNewSize) && NewSize > MaxNewSize) {
+    vm_exit_during_initialization("Initial young gen size set larger than the maximum young gen size");
+  }
+
   if (FLAG_IS_CMDLINE(NewSize)) {
     _min_desired_young_length = MAX2((uint) (NewSize / HeapRegion::GrainBytes),
                                      1U);