padding
Unused bytes the compiler adds so fields line up.
Padding is unused space inserted between or after fields to meet alignment requirements.
Loading interactive…
Examples
std::mem::size_of::<(i32, u8)>()is 8, not 5: thei32takes bytes 0 to 3, theu8byte 4, and 3 bytes of padding follow.
See also