Blog30K views4,894 votes0 replies1,330 following
Optimizing C Structure Layout with alignas and offsetof
C structs include invisible padding for alignment. Learn how alignas and offsetof let you measure and control layout to avoid memory waste and false sharing.