3.30 __attribute__((aligned)) variable attribute

The aligned variable attribute specifies a minimum alignment for the variable or structure field, measured in bytes.

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));
Non-ConfidentialPDF file icon PDF version100067_0609_00_en
Copyright © 2014–2017 Arm Limited (or its affiliates). All rights reserved.