RFR: 8375747: ZGC: ZForwardingTest is unable to commit memory on Windows
Stefan Karlsson
stefank at openjdk.org
Wed Jan 28 20:28:06 UTC 2026
The ZForwardingTest gtest first reserves memory via the ZGC APIs to do so and then uses the generic `os::commit_memory(...)` to commit the memory. That is problematic on Windows because the two APIs are not compatible there. I've updated the test to use ZGC's APIs to commit and map memory instead.
Thanks to @roberttoyonaga for finding this and helping out diagnosing this issue!
The patch also adds some tiny fixes to the assert code that mislead me while prototyping this.
I'll run this through tier1 testing.
-------------
Commit messages:
- Add missing constructor
- Commit via ZGC infrastructure instead of os::commit
Changes: https://git.openjdk.org/jdk/pull/29471/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29471&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8375747
Stats: 74 lines in 3 files changed: 61 ins; 0 del; 13 mod
Patch: https://git.openjdk.org/jdk/pull/29471.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29471/head:pull/29471
PR: https://git.openjdk.org/jdk/pull/29471
More information about the hotspot-gc-dev
mailing list