RFR: 8371637: allocateNativeInternal sometimes return incorrectly aligned memory

Johan Sjölen jsjolen at openjdk.org
Fri Nov 14 08:15:03 UTC 2025


On Wed, 12 Nov 2025 11:19:51 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> Yeah, that would be nice -- but I noticed that posix_memalign is currently not allowed in hotspot code:

That is because NMT doesn't support allocations with alignment `>16` bytes at the moment. In Hotspot, we've been working with the assumption of 16 byte alignment, due to the C standard (as per Kim's comment).

Supporting `posix_memalign` isn't impossible, it's simply not been a priority.

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

PR Comment: https://git.openjdk.org/jdk/pull/28235#issuecomment-3531492676


More information about the core-libs-dev mailing list