RFR: 8370494: G1: NewSize not bounded by InitialHeapSize or MaxHeapSize
Ivan Walulya
iwalulya at openjdk.org
Mon Nov 3 15:35:20 UTC 2025
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.
-------------
Commit messages:
- Merge remote-tracking branch 'upstream/master' into newsize_branch
- Merge remote-tracking branch 'upstream/master' into newsize_branch
- here
Changes: https://git.openjdk.org/jdk/pull/28111/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28111&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8370494
Stats: 18 lines in 1 file changed: 18 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/28111.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28111/head:pull/28111
PR: https://git.openjdk.org/jdk/pull/28111
More information about the hotspot-gc-dev
mailing list