File tree 1 file changed +7
-3
lines changed
src/hotspot/share/gc/shared
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -240,9 +240,13 @@ void GenArguments::initialize_size_info() {
240
240
size_t initial_young_size = NewSize;
241
241
242
242
if (MaxHeapSize == InitialHeapSize) {
243
- // The maximum and initial heap sizes are the same so the generation's
244
- // initial size must be the same as it maximum size. Use NewSize as the
245
- // size if set on command line.
243
+ // The maximum and initial heap sizes are the same, so the generation's
244
+ // initial size must be the same as its maximum size.
245
+ if (FLAG_IS_CMDLINE (NewSize) && FLAG_IS_CMDLINE (MaxNewSize) && NewSize != MaxNewSize) {
246
+ vm_exit_during_initialization (
247
+ " The MaxNewSize must be the same as NewSize because the MaxHeapSize and InitialHeapSize are the same." );
248
+ }
249
+ // Use NewSize as the size if it is set on command line.
246
250
max_young_size = FLAG_IS_CMDLINE (NewSize) ? NewSize : max_young_size;
247
251
initial_young_size = max_young_size;
248
252
You can’t perform that action at this time.
0 commit comments