RFR: 8376398: [TESTBUG] Testing of Unsafe native (re)allocation is sensitive to current JDK native memory use
Eirik Bjørsnøs
eirbjo at openjdk.org
Mon Jan 26 18:35:18 UTC 2026
Please consider this PR which bumps the size of attempted allocations with 1m such that the tests are less brittle to JDK-internal native memory use.
These tests currently run with `XX:MallocLimit=other:100m:oom`, but also try to allocate `100 * 1024 * 1024` bytes.
With current JDK-internal native memory use, these allocation fail with OOM. When the JDK itself uses less memory, these tests start failing because allocation succeeds.
I think we should simply try to allocate one more megabyte than the configured limit, which should cause the allocation to fail regardless of internal JVM native memory use.
-------------
Commit messages:
- Attempt to allocate 1m more than limit
Changes: https://git.openjdk.org/jdk/pull/29429/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29429&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8376398
Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/29429.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/29429/head:pull/29429
PR: https://git.openjdk.org/jdk/pull/29429
More information about the hotspot-runtime-dev
mailing list