RFR: 8337938: ZUtils::alloc_aligned allocates without reporting to NMT

Joel Sikström duke at openjdk.org
Fri Aug 9 12:57:44 UTC 2024


Replaces usage of posix_memalign/_aligned_malloc with os::malloc and manual alignment to report memory usage to NMT. Manually aligning the memory makes the returned address unfreeable by malloc (as clarified by the added comment), which is reasonable since the memory used by ZUtils::alloc_aligned is never freed.

Tested with tiers 1-3.

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

Commit messages:
 - Remove trailing whitespace
 - 8337938: ZUtils::alloc_aligned allocates without reporting to NMT

Changes: https://git.openjdk.org/jdk/pull/20523/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20523&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8337938
  Stats: 101 lines in 6 files changed: 13 ins; 83 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/20523.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20523/head:pull/20523

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


More information about the hotspot-gc-dev mailing list