On Fri, 12 Jan 2024 14:35:01 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.
>
> Per Minborg has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Update copyright year
>  - Add test for zero-out

test/jdk/java/foreign/TestScope.java line 150:

> 148:     }
> 149: 
> 150:     private static final MemorySegment ZEROED_MEMORY = 
> MemorySegment.ofArray(new byte[8102]);

The nearest power of two is 8192 (2<sup>13</sup>):
Suggestion:

    private static final MemorySegment ZEROED_MEMORY = 
MemorySegment.ofArray(new byte[8192]);

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17308#discussion_r1468703138

Reply via email to