8257901: ZGC: Take virtual memory usage into account when sizing heap #1696
MaxVirtMemFraction limits the amount of address space the GC should use for the heap. This is used by the heuristics in Arguments::set_heap_size() to select an appropriate default max heap size. However, that heuristic can select a max heap size that will not fit with ZGC, since ZGC uses additional address space (for multi-mapping and the virtual-to-physical ratio). As a result, if the address space is limited, and -Xmx is not specified, then ZGC might refuse to start with the error:
"Failed to reserve enough address space for Java heap"
I propose we abstract MaxVirtMemFraction to make it configurable for each GC, so that the heuristics in Arguments::set_heap_size() will pick a default max heap size that also works for ZGC.
Testing: Manual testing using different ulimit -v sizes.
The text was updated successfully, but these errors were encountered:
@pliden This change now passes all automated pre-integration checks.
After integration, the commit message for the final commit will be:
At the time when this comment was updated there had been 53 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
@pliden Since your change was applied there have been 54 commits pushed to the
Your commit was automatically rebased without conflicts.
Pushed as commit 0a0691e.