On Fri, 10 Jul 2026 19:11:17 GMT, Vladimir Ivanov <[email protected]> wrote:

>> Kuai Wei has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   change callsites of other java source
>
> src/java.base/share/classes/jdk/internal/util/ArraysSupport.java line 154:
> 
>> 152:             // boundary and reach an inaccessible page. Copy exact tail 
>> bytes to a temp
>> 153:             // buffer to avoid out-of-bounds access.
>> 154:             byte[] buff = new byte[Long.BYTES];
> 
> What's the point of messing with a temp buffer? Why can't you simply compare 
> tail bytes one by one?

The intent is to load all remaining tail bytes into a single long word and 
compare them in one operation. The temp buffer is used to ensure safe memory 
access. If the allocation overhead is a concern, I can switch to a  
byte-by-byte loop.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31802#discussion_r3570201255

Reply via email to