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
--- 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);