Forum > Windows
Global variables alignment
User137:
You can still solve all your aligning problems by wrapping them inside records?
--- Code: ---{$ALIGN 1}
...
TGlobalVarPack1 = record
a, b: byte;
c, d: byte;
end; // sizeof 4 bytes
var
gv1: TGlobalVarPack1;
implementation
...
--- End code ---
Any mistakes there, or should it just be packed record?
Marladu:
Thanks to a nice contributor to a different question on this forum this issue is fully resolved now. There's a variation on the compiler directive {$codealign} that guarantees results I was looking for: {$CODEALIGN VARMIN=xxx}.
Navigation
[0] Message Index
[*] Previous page