core.runtime.GC memory alignment

growler growlercab at gmail.com
Tue Oct 29 16:37:43 PDT 2013


On Tuesday, 29 October 2013 at 12:31:00 UTC, Artur Skawina wrote:
> On 10/29/13 06:36, growler wrote:
>>> My understanding of that is S is not affected by the 
>>> alignment of its fields.
>> 
>> To clarify, I mean the *alignment* of S is not affected by the 
>> alignment of its fields.
>
> The alignment of an object must be at least as large as the max 
> of the alignment
> of all fields that it contains, obviously. The object layout 
> never changes; using
> a smaller alignment for the parent object would make it 
> impossible to guarantee the
> specified field alignment.
>
> artur

You're right, it would be nonsensical otherwise.


More information about the Digitalmars-d mailing list