Vadiraj wrote: > > Can any body provide some light on Byte Alignment & Structure Padding > > for gcc linux x86 32-bit? > > The system expects the address of a variable to be multiple of > its size. Meaning for 32 bit x86 int being 4 bytes. The address > location of a int variable is expected to be at multiple of 4. > ex 0 4 8 12 16. if its double then its expected it to be multiple of 8. > 0 8 16 ...
Incorrect; 8-byte quantities (double and long long) are only 4-byte aligned, not 8-byte aligned. -- Glynn Clements <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
