[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Struct memory format question

Thanks, Antoine. I was hoping that was the case. I filed a PR to make this
more specific in the spec.

This is filed under a Rust issue where this question came about.



On Sat, Apr 28, 2018 at 9:35 AM, Antoine Pitrou <antoine@xxxxxxxxxx> wrote:

> Le 28/04/2018 à 16:55, Andy Grove a écrit :
> > I have implemented structs in Rust as a vector of Arrays. Each nested
> array
> > uses a byte-aligned contiguous region of memory, but the array for field
> 2
> > is not contiguous with the array for field 1.
> Child arrays of a nested arrays do not have to be contiguous with one
> another.  They are truly independent arrays that just happen to be
> related through their usage in the nested array.
> Regards
> Antoine.