JDK-8372066 : Release Note: Deprecate the `MaxRAM` Flag
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 26
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2025-11-18
  • Updated: 2025-12-08
  • Resolved: 2025-12-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26Resolved
Description
To simplify heap sizing and reduce user confusion, the `MaxRAM flag has been marked as deprecated with the intent to be obsoleted and removed in future releases. Explicit configuration of `MaxRAM` is rarely necessary, as the JVM accurately detects available physical memory and system commit limits. Setting `MaxRAM` above the actual physical memory may lead to incorrect heap sizing and is not a common use case.

Additionally, the default value of `MaxRAM` has been removed. From now on and until the `MaxRAM` flag is obsoleted, heap sizing calculations are based on the available memory on the system rather than the default value of `MaxRAM`, unless `MaxRAM` is explicitly set by the user.

Users who need to control the heap size directly are encouraged to use flags such as `-Xms` and `-Xmx` instead.
Comments
Reviewed by the GC team.
08-12-2025