Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 12894:24f32d09a0d7
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
author | jwilhelm |
---|---|
date | Sat, 12 Oct 2013 00:49:19 +0200 |
parents | 9b4d0569f2f4 |
children | 4288e54fd145 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Sat Oct 12 05:08:42 2013 +0000 +++ b/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);