On Wed, 10 Jan 2024 14:19:29 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
>> 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. > > It's not a default method. That said, according to this suggestion it could > be possible to move the text in the ofAuto/ofConfined/ofArena factories. The choice here is: if we allow non-zeroing implementation, implementors of Arena have more flexibility, but clients have less guarantees (how does a client know if what they get back is zeroed?) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17308#discussion_r1447452246