The aligned variable attribute specifies a minimum alignment for the variable or structure field, measured in bytes.
Note
This variable attribute is a GNU compiler extension that the ARM compiler supports.
Example
/* Aligns on 16-byte boundary */
int x __attribute__((aligned (16)));
/* In this case, the alignment used is the maximum alignment for a scalar data type. For ARM, this is 8 bytes. */
short my_array[3] __attribute__((aligned));
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.