The various C data types are aligned on specific byte boundaries to maximize storage potential and to provide for fast, efficient memory access with the ARM instruction set.
For example, the ARM architecture can access a four-byte variable using only one
instruction when the object is stored at an address divisible by four, so four-byte objects
are located on four-byte boundaries.
ARM and Thumb processors are designed to efficiently access naturally aligned data, that is, doublewords that lie on addresses that are
multiples of eight, words that lie on addresses that are multiples of four, halfwords that
lie on addresses that are multiples of two, and single bytes that lie at any byte address.
Such data is located on its natural size boundary.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.