hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
changeset 20721 b134465e8682
parent 20398 b206c580c45f
child 21558 8dcd5451cdca
--- 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);