8.4.3. Indexes

When using large arrays or objects in a 64-bit environment, be aware that an int might no longer be large enough to index all entries. In particular, be careful when iterating over an array using an int index.

  static char array[BIG_NUMBER];
  for (unsigned int index = 0; index != BIG_NUMBER; index++) ...

Since size_t is a 64-bit type and unsigned int is a 32-bit type, it is possible to define the size of the object so that the loop never terminates.

Copyright © 2015 ARM. All rights reserved.ARM DEN0024A
Non-ConfidentialID050815