The Only Natural Alignment Is Byte Alignment
Posted May 16, 2012 10:03 UTC (Wed) by ldo
Parent article: Fixing the unfixable autofs ABI
This is why alignment on greater than one-byte boundaries should never be included in any interchange format or protocol, because invariably the architectural considerations that make them look like a good idea at one end in one situation will end up looking stupid at the other end or in another situation. And because it’s an interchange format, you cannot just simply change it without breaking compatibility.
Alignment only makes sense for internal program in-memory structures, which can be changed with a simple recompile and restart. Interchange formats should always be defined with no alignment padding. End of story.
to post comments)