8023643: G1 assert failed when NewSize was specified greater than MaxNewSize

Exit with an error if incompatible NewSize and MaxNeSize are set

Reviewed-by: brutisso, tschatzl
This commit is contained in:
Jesper Wilhelmsson 2013-10-12 00:49:19 +02:00
parent 354de63fbf
commit 588c91b042

View File

@ -344,6 +344,10 @@ G1YoungGenSizer::G1YoungGenSizer() : _sizer_kind(SizerDefaults), _adaptive_size(
}
}
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);