RFR: 8370494: G1: NewSize not bounded by InitialHeapSize or MaxHeapSize
Ivan Walulya
iwalulya at openjdk.org
Tue Nov 4 10:19:37 UTC 2025
On Mon, 3 Nov 2025 14:04:34 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
> Hi,
>
> Please review this change to ensure that NewSize and MaxNewSize values specified on the command line are validated and adjusted to remain within the valid heap size range. Previously, G1 did not check for inconsistencies between` -XX:NewSize / -XX:MaxNewSize` and the `-XX:InitialHeapSize / -XX:MaxHeapSize`. As a result, users could configure `NewSize` or `MaxNewSize` values larger than the `MaxHeapSize` without receiving any warnings.
>
> The change mirrors how Parallel GC already handles this scenario.
Ongoing work is addressing the inconsistent use of `FLAG_IS_CMDLINE` and `FLAG_IS_DEFAULT` in HotSpot. This issue will be resolved as part of that effort.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28111#issuecomment-3485099743
More information about the hotspot-gc-dev
mailing list