On Thu, 6 Sep 2001, da Silva, Joe wrote:
I don't think it's surprising that a 32 bit compiler likes to align data to 32 bit (4 byte) boundaries. ;-)
I'm no expert on this, but I suspect this may be an "optimisation" setting in the compiler build (for optimal code speed, I guess).
Another thing to try is the magic word "packed", as in "packed record", in lieu of simply "record" ...
The registers in ix86 cpu's (EAX, EAY, etc ) are 32 bits. Memory access is 32 bits.
So it's a trade-off: you can pack more data in memory if you work around the 4 byte boundrys but your run time will be slower and your code may be a bit bloated.
Russ