Class Instance allocations

bearophile bearophileHUGS at lycos.com
Wed Jan 13 09:16:30 PST 2010


Justin Johansson:
> So why on earth, since Visual Studio 2001 (and before?), was the default 
> alignment set to 8 bytes for the M$ C/C++ compiler code generation 
> option?

Maybe because for compatibility reasons they can't require a 16 bytes alignment (as OS X does, I think) as SSE registers appreciate.


>>Is that true? Is this required by the tag bits added by the GC scans? Does std.c.stdlib.malloc always return aligned to 8 on Windows?<<

And no one has given me such answers yet.
And currently the D GC seems to always return aligned to 16 bytes (even chunks of memory smaller than 16 bytes).

Bye,
bearophile



More information about the Digitalmars-d mailing list