On Mon, 23 Nov 2026 10:49:38 GMT, Viktor Klang <[email protected]> wrote:

>> putLongOnHeap and getLongOnHeap ignored valueOffset computed during setup. 
>> Fixed as suggested by @AlanBateman 
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> test/micro/org/openjdk/bench/sun/misc/UnsafeOps.java line 63:
> 
>> 61: 
>> 62:         address = U.allocateMemory(1000);
>> 63:         U.putLong(null, address, 0);
> 
> What's the intent of this? (To ensure `getLongOffHeap` doesn't read from 
> uninitialized memory I presume, but it is worth adding a comment to that 
> effect here)

Yes, just to ensure that it's not reading from uninitialized memory. It doesn't 
matter for the benchmark of course but I agree it should probably have a 
comment.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33993#discussion_r4665418482

Reply via email to