> 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
On Wed, 3 May 2023 14:54:26 GMT, Maurizio Cimadamore
wrote:
> Actually, now that I look at it, it seems that the exception we raise is not
> correct. I think we need to throw if the element size is not a multiple of
> the alignment. That is, the size determines the stride, so that has to be a
On Wed, 3 May 2023 14:26:03 GMT, Jorn Vernee wrote:
> > Actually, now that I look at it, it seems that the exception we raise is
> > not correct. I think we need to throw if the element size is not a multiple
> > of the alignment. That is, the size determines the stride, so that has to
> > be
On Wed, 3 May 2023 14:20:22 GMT, Maurizio Cimadamore
wrote:
> Actually, now that I look at it, it seems that the exception we raise is not
> correct. I think we need to throw if the element size is not a multiple of
> the alignment. That is, the size determines the stride, so that has to be a
On Wed, 3 May 2023 14:17:02 GMT, Maurizio Cimadamore
wrote:
> > 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?
>
> That case already has
On Wed, 3 May 2023 08:31:34 GMT, Maurizio Cimadamore
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
On Wed, 3 May 2023 13:48:11 GMT, Per Minborg wrote:
> 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?
That case already has some javadoc text:
On Wed, 3 May 2023 08:31:34 GMT, Maurizio Cimadamore
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
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