-
Enhancement
-
Resolution: Fixed
-
P4
-
9
-
b05
The problem arises in Arguments::set_heap_size when ergonomically calculating the value for InitialHeapSize. A user might have specified a certain value for -XX:MaxHeapSize, for example 512m. If the machine has a lot of RAM, and InitialRAMFraction is unchanged, then:
julong reasonable_initial = phys_mem / InitialRAMFraction;
might become larger than MaxHeapSize. This will cause:
reasonable_initial = MIN2(reasonable_initial, (julong)MaxHeapSize);
to equal MaxHeapSize. This is not a huge problem until GenCollectorPolicy::initialize_size_info:
if (_max_heap_byte_size == _initial_heap_byte_size) {
// The maximum and initial heap sizes are the same so the generation's
// initial size must be the same as it maximum size. Use NewSize as the
// size if set on command line.
_max_young_size = FLAG_IS_CMDLINE(NewSize) ? NewSize : _max_young_size;
_initial_young_size = _max_young_size;
// Also update the minimum size if min == initial == max.
if (_max_heap_byte_size == _min_heap_byte_size) {
_min_young_size = _max_young_size;
}
}
This might cause an unexpected value for MaxNewSize.
julong reasonable_initial = phys_mem / InitialRAMFraction;
might become larger than MaxHeapSize. This will cause:
reasonable_initial = MIN2(reasonable_initial, (julong)MaxHeapSize);
to equal MaxHeapSize. This is not a huge problem until GenCollectorPolicy::initialize_size_info:
if (_max_heap_byte_size == _initial_heap_byte_size) {
// The maximum and initial heap sizes are the same so the generation's
// initial size must be the same as it maximum size. Use NewSize as the
// size if set on command line.
_max_young_size = FLAG_IS_CMDLINE(NewSize) ? NewSize : _max_young_size;
_initial_young_size = _max_young_size;
// Also update the minimum size if min == initial == max.
if (_max_heap_byte_size == _min_heap_byte_size) {
_min_young_size = _max_young_size;
}
}
This might cause an unexpected value for MaxNewSize.
- csr for
-
JDK-8309304 Abort the VM if MaxNewSize is not the same as NewSize when MaxHeapSize is the same as InitialHeapSize
-
- Closed
-
- relates to
-
JDK-8311213 Two jfr tests (TestPromotionFailedEventWith{ParallelScavenge/DefNew}.java) fail after JDK-8047998
-
- Closed
-
-
JDK-8311214 [REDO] JDK-8047998 Abort the vm if MaxNewSize is not the same as NewSize when MaxHeapSize is the same as InitialHeapSize
-
- Open
-