Alignment of dynamic arrays

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 9 05:02:54 PST 2015


On 1/9/15 7:43 AM, Robert burner Schadek wrote:
> On Friday, 9 January 2015 at 11:19:47 UTC, bearophile wrote:
>> If you have a 16-byte aligned array of doubles and you slice the first
>> double away, what's the alignment of the result?
>
> the first double[0] is 16-byte aligned, double[1] would be 20-byte
> aligned as a double is 4 byte long.
>
> p.s. I'm properly wrong as my last two posts contained errors

*sigh* s/20/24, s/4 byte/8 byte :)

-Steve


More information about the Digitalmars-d mailing list