On Mon, 18 Nov 2024 14:34:13 GMT, Quan Anh Mai <qa...@openjdk.org> wrote:

>> @rkennke
>>> BTW, this problem is not specific to UseCompactObjectHeaders - I think the 
>>> same problem would happen with -UseCompressedClassPointers. With 
>>> uncompressed class-pointers, byte[] would start at offset 20, while long[] 
>>> start at offset 24. But nobody cares about -UCCP I think.
>> 
>> Sure. But I guess some people will want to run both `AlignVector` and 
>> `UseCompactObjectHeaders` in the future. Some machines simply do require 
>> strict alignment. So they will have to live with that tradeoff.
>
> @eme64 Tbh I don't see how `AlignVector` can mitigate the issue if strict 
> alignment is required unless the object base is guaranteed to be aligned at 
> least as much as the vector length.

@merykitty the object base is always at least `8-byte` aligned, see 
`ObjectAlignmentInBytes` - this also holds for all arrays. But the issue is the 
offset from the object base to the array payload.

@rkennke yes, working on fixing the tests :)

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

PR Comment: https://git.openjdk.org/jdk/pull/20677#issuecomment-2483236250

Reply via email to