check here.
Basically the compiler will insert unused memory into a structure so that data members are optimally aligned for better performance.
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
时间: 2024-10-21 15:28:21
check here.
Basically the compiler will insert unused memory into a structure so that data members are optimally aligned for better performance.
Why isn't sizeof for a struct equal to the sum of sizeof of each member?