| |||
| Home > Compiler Coding Practices > Compiler storage of data objects by natural byte alignment | |||
By default, the compiler stores data objects by byte alignment as shown in Table 16.
Table 16. Compiler storage of data objects by byte alignment
| Type | Bytes | Alignment |
|---|---|---|
char, bool, _Bool. | 1 | Located at any byte address. |
short, wchar_t. | 2 | Located at any address that is evenly divisible by 2. |
| 4 | Located at an address that is evenly divisible by 4. |
| 8 | Located at an address that is evenly divisible by 8. |