core.runtime.GC memory alignment

Artur Skawina art.08.09 at gmail.com
Tue Oct 29 05:30:40 PDT 2013


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


More information about the Digitalmars-d mailing list