It seems, that docs are outdated. Default data alignment in records is expected to be wordly (i386, win32).
But if a record has int64 (or qword) element, I get unexpected overheads. It's easily avoidable (with {$PACKRECORDS 1} or {$A1}; even with {$A-} [which is expected to work only on MAC, according to docs]), but unexpected. type a= record a: longword; b: longword; c: longword; end; // 12 expected b= record ab: int64; c: longword; end; // 12 expected c= record ab: array[0..7] of byte; c: byte; // 1b overhead expected d: word; e: byte; // 1b overhead expected end; // 14 expected d= record ab: int64; c: byte; // 1b overhead expected d: word; e: byte; // 1b overhead expected end; // 14 expected e= record a: byte; b: byte; c: word; d: longword; e: word; f: byte; g: byte; end; // well, 12 expected begin writeln(sizeof(a)); // 12 ok! writeln(sizeof(b)); // 16 ??? writeln(sizeof(c)); // 14 ok! writeln(sizeof(d)); // 16 ??? writeln(sizeof(e)); // 12 ok! end. // I don't know the numbers on other platforms/systems _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel