Integrated: 8378319: Obsolete the MaxRAM flag

Joel Sikström jsikstro at openjdk.org
Tue Feb 24 09:24:00 UTC 2026


On Fri, 20 Feb 2026 08:46:20 GMT, Joel Sikström <jsikstro at openjdk.org> wrote:

> Hello,
> 
> This PR obsoletes the MaxRAM flag after being deprecated in JDK26. Removing the flag from the arguments-parsing code is straightforward, but is more complicated in the documentation and several tests using the flag.
> 
> For the documentation I've opted to use the term "available memory to the JVM process" consistently instead, which I've repurposed from the now removed description of the MaxRAM flag.
> 
> There are several tests using the MaxRAM flag because of its type (uint64_t). For those tests I've replaced it with either `ErrorLogTimeout` or `StringDeduplicationHashSeed`. Since we don't have any "unlimited/unbound" product uint64_t flags, I've used `StringDeduplicationHashSeed` for places requiring an "unlimited/unbound" flag, and made sure that `-XX:+UnlockDiagnosticVMOptions` is present.
> 
> There are three jtreg tests that have been using MaxRAM to "simulate" being on a machine with more RAM than might be available and I've had to come up with a new approach for all three.
> 
> test/hotspot/jtreg/gc/arguments/TestMaxRAMFlags.java (renamed to TestMaxRAMPercentage.java)
> test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java
> test/hotspot/jtreg/gc/g1/TestRegionAlignment.java
> 
> 
> Perhaps the most controversial change is for TestMaxRAMPercentage.java (renamed from testMaxRAMFlags.java), which is only run for machines with more RAM than the required maxcoopheapsize + a bit of headroom, so we can test all scenarios.
> 
> Testing:
> * I've run all tests that I've changed locally in both release and fastdebug on Mac+Linux.
> * Oracle's tier1-4

This pull request has now been integrated.

Changeset: bd99c627
Author:    Joel Sikström <jsikstro at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/bd99c627b170147a796512810c8ecd98db12781e
Stats:     343 lines in 11 files changed: 148 ins; 163 del; 32 mod

8378319: Obsolete the MaxRAM flag

Reviewed-by: ayang, tschatzl

-------------

PR: https://git.openjdk.org/jdk/pull/29838


More information about the hotspot-dev mailing list