Content deleted Content added
Add category |
style |
||
Line 158:
</syntaxhighlight>
The compiled size of the structure is now 12 bytes.
The last member is padded with the number of bytes required so that the total size of the structure should be a multiple of the largest alignment of any structure member ({{mono|1=alignof(int)}} in this case, which = 4 on linux-32bit/gcc){{Citation needed|reason=see Talk:Data structure alignment (least common multiple requires at least 2 args) and Talk:Data structure alignment (calculation of whole structure alignment and paddings).|date=February 2011}}. In this case 3 bytes are added to the last member to pad the structure to the size of 12 bytes ({{mono|1=alignof(int) * 3}}).
|