Integrated: 8354922: ZGC: Use MAP_FIXED_NOREPLACE when reserving memory

Stefan Karlsson stefank at openjdk.org
Tue Apr 22 11:26:01 UTC 2025


On Thu, 17 Apr 2025 08:30:27 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> We have seen that some versions of the Linux kernel does not honor the address hint when mmapping memory without MAP_FIXED, if there is an adjacent memory area above the requested memory area. If we use MAP_FIXED_NOREPLACE, the reservation succeeds. I propose that we start using MAP_FIXED_NOREPLACE.
> 
> Tested via GHA, which runs the gtest that performs a discontiguous, but adjacent reservation. I will run this through a bunch of tiers before integrating.

This pull request has now been integrated.

Changeset: 0f1c448c
Author:    Stefan Karlsson <stefank at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/0f1c448ca15485cd7270cf0607acfceacdcefaff
Stats:     10 lines in 2 files changed: 9 ins; 0 del; 1 mod

8354922: ZGC: Use MAP_FIXED_NOREPLACE when reserving memory

Reviewed-by: aboldtch, eosterlund

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

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


More information about the hotspot-gc-dev mailing list