Cache Line Alignment

Back to Alignment & Padding

Aligning data structures to cache line boundaries (typically 64 bytes) to prevent data from straddling two cache lines. Proper cache line alignment avoids false sharing in concurrent code and ensures efficient cache utilization.

memory-models memory-layout cache-line alignment