Serguey Asael Shinder: JEP 546 would let ZGC size the heap itself, targeted for JDK 28
JEP 546, "Adaptive Heap Sizing for ZGC," is targeted for JDK 28, according to the OpenJDK JDK 28 project page (last updated 15 October 2026) and the JEP document. It proposes to enhance the Z Garbage Collector (ZGC) to adjust the size of the heap adaptively — based on the resources available, the application's needs, and the needs of neighbouring applications competing for the same resources — rather than relying on a fixed, manually chosen heap size.
What it aims to do. The JEP lists three goals. Adjust the heap size in response to changes in the workload and the host system. Provide the same throughput and latency as a well-tuned, manually configured heap — that is, automation that does not cost performance against a careful hand-tuning. And ensure that existing command-line options for sizing and tuning the heap continue to work, so operators who already set heap limits are not forced to change.

Why it is proposed. The JEP frames the garbage collector's job as maintaining "the illusion of an infinite heap" on finite physical memory. ZGC is a tracing collector: it finds live objects by starting from roots — static fields of loaded classes, local variables in stack frames — and following references. The motivation for adaptive sizing is that a single fixed heap size is rarely right across changing workloads and shared hosts: too small and the collector works too hard, too large and memory is wasted or taken from neighbouring applications. Letting ZGC size the heap to current conditions is meant to remove that manual guesswork while preserving the behaviour of the existing flags for those who want them.
What this is and is not. This is a JEP targeted for JDK 28, which means it is slated for that release but is still a proposal with a specification that can change before general availability; it sits alongside the other ZGC JEP targeted for JDK 28, JEP 545 on startup and warmup. The detail of the sizing heuristics and any new or changed options is in the JEP itself and will firm up as it is implemented; this item reports the goals and motivation the JEP states, not a finished, benchmarked feature.
Source: OpenJDK, "JEP 546: Adaptive Heap Sizing for ZGC" — https://openjdk.org/jeps/546