Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2015-07

alignment 16 byte ?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marco van de Voort

Why are sets by default aligned to their own size? Seems a bit excessive. The 2.6.x series does too though, so I thought I'd ask about the reasons.

(The size of

type
 TSomerecord = record
                   x : byte;
                   s : set of byte;
                 end;

is 64-byte), iow 31-bytes of alignment are inserted?

Reply by email

Jonas Maebe
to Marco van de Voort
Marco van de Voort wrote
Why are sets by default aligned to their own size?

Probably because that's the default way in which FPC aligns any type, unless it's explicitly overridden (and it was never overridden for sets).

Jonas

Reply by email