[fpc-devel] Alignment question

Jonas Maebe jonas.maebe at elis.ugent.be
Sun Nov 20 21:11:01 CET 2011


On 20 Nov 2011, at 21:04, Florian Klämpfl wrote:

> So declaring the type once with the right recordaligmax should be
> sufficient?

recordalignmax does not mean that a type will be aligned to a multiple of that value. It only means that it will be aligned to that value *if* it contains any fields that need such an alignment. E.g., if you are on a system where double is defined as preferring 8-byte alignment and a record contains a double field, then recordalignmax=4 will result in that record nevertheless getting aligned to 4 bytes, but recordalignmax=8 or recordalignmax=16 or any other value >= 8 means that it will be aligned to 8 bytes.


Jonas


More information about the fpc-devel mailing list