Re: RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate [v5]

2024-01-29 Thread Per Minborg
On Sun, 28 Jan 2024 00:57:24 GMT, ExE Boss  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 (213):
> 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


Re: RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate [v5]

2024-01-27 Thread ExE Boss
On Fri, 12 Jan 2024 14:35:01 GMT, Per Minborg  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 (213):
Suggestion:

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

-

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


Re: RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate [v5]

2024-01-12 Thread Per Minborg
> 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

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/17308/files
  - new: https://git.openjdk.org/jdk/pull/17308/files/7723f604..feb904fb

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk=17308=04
 - incr: https://webrevs.openjdk.org/?repo=jdk=17308=03-04

  Stats: 39 lines in 2 files changed: 37 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/17308.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/17308/head:pull/17308

PR: https://git.openjdk.org/jdk/pull/17308