On Mon, 8 Jan 2024 16:16:50 GMT, Per Minborg <pminb...@openjdk.org> wrote:
> This PR proposes to add a clarification that an `Arena` always returns > zeroed-out segments for `Arena::allocate` methods. > > Note that other overloaded methods refer to the abstract `Arena::allocate` > method via implementation notes. src/java.base/share/classes/java/lang/foreign/Arena.java line 269: > 267: * @implSpec > 268: * Implementations of this method must return a native, > zero-initialized segment > 269: * featuring the requested size, and that is compatible with the > provided alignment Do we want to _mandate_ that all arenas return zero-initialized memory? Maybe it's enough to say that the default implementation does this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17308#discussion_r1447440934