On Thu, 11 Jan 2024 07:59:37 GMT, Per Minborg <[email protected]> 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.
>
> Per Minborg has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Move and change text on zeroing out
src/java.base/share/classes/java/lang/foreign/Arena.java line 215:
> 213: * {@linkplain #ofConfined()} and, {@linkplain #ofShared()} will return
> segments
> 214: * that are zeroed out when invoking {@linkplain Arena#allocate(long,
> long) allocate()}.
> 215: *
I'd expect to find this in the javadoc of each factory method (not in an
implSpec). The note says something about those particular methods, not about
the Arena type as a whole.
I also think "zero intialized" sounds a bit more professional than "zeroed
out". I suggest the following phrasing:
Memory segments {@linkPlain #allocate(long, long) allocated} by the
returned arena are zero initialized
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17308#discussion_r1450270020