RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate [v5]
Per Minborg
pminborg at openjdk.org
Mon Jan 29 12:35:36 UTC 2024
On Sun, 28 Jan 2024 00:57:24 GMT, ExE Boss <duke at openjdk.org> wrote:
>> 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]);
Good catch. This was a typo. However, the test works as intended and the PR is already integrated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17308#discussion_r1469525320
More information about the core-libs-dev
mailing list