[fpc-devel] data alignment and int64 (or qword, maybe any singlepiece of size 8 if any)

Пётр Косаревский ppkk at mail.ru
Tue May 16 11:50:18 CEST 2006


I myself don't have unsolved problems with alignment in records.

I only point at some inconsistency with 16-byte alignment by default: variables are 16-bytes aligned and their members of type int64 may have addresses not divisible byt 4.

{$PACKRECORDS n} has almost nothing to do with this inconsistency.

I wrote about default behavior.

I wrote about dependency of alignment of variables on compiler switch: if I want to conserve memory and may have int64 aligned (by default) only by word, I don't want big gaps between variables because of 16 bytes alignment.

Originally I pointed to the lack of documentation (which states, that the default alignment in records is 1-2 bytes).



More information about the fpc-devel mailing list