On Wed, 19 Nov 2025 14:30:17 GMT, Maurizio Cimadamore <[email protected]> 
wrote:

>> Harald Eilertsen has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Replace conditional with Math.max intrinsic
>>   
>>   Co-authored-by: ExE Boss <[email protected]>
>
> I think the proposed simpler patch makes sense. Basically, it artificially 
> expands the allocation size to match the alignment, which is probably not 
> going to cause any side-effect as that is likely what was happening anyway...

@mcimadamore:

Question regarding `MAX_MALLOC_ALIGN = Unsafe.ADDRESS_SIZE == 4 ? 8 : 16;`

Is 16 here just a heuristic based on known malloc implementations or is it 
backed by something? I can't find anything regarding that in the libc standard. 

Not related to this particular PR: should `MAX_MALLOC_ALIGN` be 
`MIN_MALLOC_ALIGN` instead? Larger allocations might be page size aligned.

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

PR Comment: https://git.openjdk.org/jdk/pull/28235#issuecomment-3557358928

Reply via email to