RFR: 8318966: Some methods make promises about Java array element alignment that are too strong

Jorn Vernee jvernee at openjdk.org
Tue Jan 23 18:40:30 UTC 2024


On Tue, 23 Jan 2024 14:43:24 GMT, Chen Liang <liach at openjdk.org> wrote:

> Also curious, is there any documentation (like JVMS) that allows JVMs to make no offset into byte arrays aligned for larger access? Would be helpful if we can have a reference here.

There is simply no guarantee in the JVMS that array elements are aligned more than their size. So, the public API may not assume that they are, since it needs to be implementable by an arbitrary JVM that is JVMS compliant.

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

PR Comment: https://git.openjdk.org/jdk/pull/16681#issuecomment-1906687425


More information about the core-libs-dev mailing list