Since the pointer on your platform takes 8 bytes, it is likely that alignment of 8 bytes is also required. Therefore, when adding 4 more bytes, the structure cannot be 12 bytes in size, and in this case, individual elements, for example, the u2 array, will not be correctly aligned with the boundaries of 8 bytes, which is necessary for the pointer element. Therefore, you need to increase its size to the next multiple of 8, which is 16. The additional 4 bytes are simply not used / undefined.
Christian rau
source share