Non-Confidential | ![]() | ARM DUI0472J | ||
| ||||
Home > Compiler Command-line Options > --min_array_alignment=opt |
Specifies the minimum alignment of arrays.
--min_array_alignment=opt
Where:
specifies the minimum alignment of arrays. The value of
opt
is one of:
1
byte alignment, or unaligned
2
two-byte, halfword alignment
4
four-byte, word alignment
8
eight-byte, doubleword alignment.
ARM does not recommend using this option, unless required in certain specialized cases. For
example, porting code to systems that have different data alignment requirements. Use of
this option can result in increased code size at the higher
opt
values, and reduced performance at the lower
opt
values. If you only want to affect the alignment
of specific arrays (rather than all arrays), use the __align
keyword instead.
If you do not use this option, arrays are unaligned (byte aligned).
Compiling the following code with --min_array_alignment=8
gives the
alignment described in the comments:
char arr_c1[1]; // alignment == 8 char c1; // alignment == 1