Skip to content- Sources: primary, discussion
- Summary: Starting in JDK 28, confined arenas in the Foreign Function and Memory API lazily take a 64-byte native pool from a per-thread cache, and virtual threads borrow one from their carrier. Pools are zeroed before reuse, and allocations that do not fit fall back to the regular allocator. JMH results in OpenJDK PR 31365 show 6.8x to 18.9x speedups for 5 and 20 byte allocations across Linux, macOS and Windows.
- Why it matters: FFM bindings and jextract wrappers that open a confined arena per native call get faster for free, but tools must no longer assume one malloc and free per arena allocation.