[jdk21u-dev] RFR: 8313319: [linux] mmap should use MAP_FIXED_NOREPLACE if available

Sergey Chernyshev schernyshev at openjdk.org
Fri Nov 14 17:55:27 UTC 2025


Hi all,

Please review the backport of JDK-8313319 that prevents unnecessary mmap-munmap cycle in systems that do not honor the address hint when mmapping memory without MAP_FIXED. Please see more details in #2475. This is (almost) a clean backport, with only a minor context conflict due to JDK-8315923 hasn't been backported to JDK 21.

Testing:

- jtreg standard test groups passed
- gtests passed

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

Commit messages:
 - 8313319: [linux] mmap should use MAP_FIXED_NOREPLACE if available

Changes: https://git.openjdk.org/jdk21u-dev/pull/2476/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=2476&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8313319
  Stats: 49 lines in 2 files changed: 47 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk21u-dev/pull/2476.diff
  Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/2476/head:pull/2476

PR: https://git.openjdk.org/jdk21u-dev/pull/2476


More information about the jdk-updates-dev mailing list