On Mon, 5 Jan 2026 17:51:56 GMT, Alan Bateman <[email protected]> wrote:

>> David Beaumont has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   actually remove the class ...
>
> src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java line 
> 394:
> 
>> 392:             throw new IndexOutOfBoundsException("size");
>> 393:         }
>> 394:         ByteBuffer result = ByteBuffer.allocateDirect((int) ((size + 
>> 0xFFF) & ~0xFFF));
> 
> Can you remind me why it allocates multiples of 4k?  
> 
> Also, would be useful to know if using ByteByte.allocate (to allocate a heap 
> buffer) would be okay here.

I can't, I've never seen this code before. No comments, no tests for why 4k is 
a good size. Probably just a "page size" heuristic. I'm just removing dead code 
and moving what's not dead out of the class to be deleted.

Changing details beyond that should probably be a different PR.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29043#discussion_r2664442989

Reply via email to