Dynamic allocation is another reason, besides arrays, for middle-padding (on the stack, the compiler could simply allocate
S1
s at odd addresses, but malloc()
must return aligned memory).