RFR: 8371637: allocateNativeInternal sometimes return incorrectly aligned memory

Kurt Miller kurt at openjdk.org
Wed Nov 12 15:43:27 UTC 2025


On Wed, 12 Nov 2025 12:15:56 GMT, Harald Eilertsen <haraldei at openjdk.org> wrote:

> > Would it make sense to add `OperatingSystem.BSD` to consolidate any such predicates?
> 
> I think so, but for this case we would also need `OperatingSystem.FreeBSD`, as I am uncerain if OpenBSD has the same issue. (NetBSD seems to also use jemalloc, and should behave like FreeBSD, though.)

OpenBSD's malloc smallest arena is 16 bytes so it matches the current assumption `MAX_MALLOC_ALIGN` makes and does not exhibit a problem with the tests.

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

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


More information about the core-libs-dev mailing list