-
Sub-task
-
Resolution: Delivered
-
P4
-
13
-
Verified
The behavior of several GC Heap selection flags have been changed to better meet the expectation of users.
Prior to this change, if the heap size selection resulting from the use of these flags exceeded the maximum reachable address when `UseCompressedOops` is enabled, the heap size would be truncated to be within the `CompressedOops` range. Also, the percentage or fractional calculation performed was based on the value of `MaxRAM` and not the amount of physical memory available in the system. The following are the options impacted by this change:
- `-XX:MaxRAMPercentage`
- `-XX:MaxRAMFraction`
- `-XX:MinRAMPercentage`
- `-XX:MinRAMFraction`
- `-XX:InitialRAMPercentage`
- `-XX:InitialRAMFraction`
- `-XX:MaxRAM`
The new behavior calculates the percentage or fraction based on the host's available memory unless the user also specifies `-XX:MaxRAM`. In addition, `UseCompressedOops` is automatically disabled if the heap size resulting from the use of any of these options, including `-XX:MaxRAM`, is greater than can be addressed in `CompressedOops` mode, unless the `-XX:+UseCompressedOops` option is specified to override this behavior.
Note: This change only impacts 64-bit platforms.
Prior to this change, if the heap size selection resulting from the use of these flags exceeded the maximum reachable address when `UseCompressedOops` is enabled, the heap size would be truncated to be within the `CompressedOops` range. Also, the percentage or fractional calculation performed was based on the value of `MaxRAM` and not the amount of physical memory available in the system. The following are the options impacted by this change:
- `-XX:MaxRAMPercentage`
- `-XX:MaxRAMFraction`
- `-XX:MinRAMPercentage`
- `-XX:MinRAMFraction`
- `-XX:InitialRAMPercentage`
- `-XX:InitialRAMFraction`
- `-XX:MaxRAM`
The new behavior calculates the percentage or fraction based on the host's available memory unless the user also specifies `-XX:MaxRAM`. In addition, `UseCompressedOops` is automatically disabled if the heap size resulting from the use of any of these options, including `-XX:MaxRAM`, is greater than can be addressed in `CompressedOops` mode, unless the `-XX:+UseCompressedOops` option is specified to override this behavior.
Note: This change only impacts 64-bit platforms.