On Wed, 3 May 2023 08:31:34 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

> This patch adds documentation for the behavior of the 
> `MemoryLayout::structLayout` factory.
> 
> This factory throws an `IllegalArgumentException` if one of the member 
> layouts passed to it occurs at an offset within the struct that is not 
> aligned.
> 
> As part of this patch, I've also added some api notes on how to use this 
> factory when unaligned elements are present.

Isn't this true also for sequence layouts where, for example, the second 
element might be misaligned for `sequenceLayout(2, structLayout(JAVA_INT, 
JAVA_SHORT))`? Or, is this already covered?

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

PR Comment: https://git.openjdk.org/jdk/pull/13770#issuecomment-1533063034

Reply via email to