| ARM Technical Support Knowledge Articles | |
Applies to: ARM Developer Suite (ADS), RealView Developer Kit (RVDK) for OKI, RealView Developer Kit (RVDK) for ST, RealView Developer Kit for XScale (RVXDK), RealView Development Suite (RVDS)
In ADS 1.1 and earlier, there is a limit of 8MB on the maximum size of objects, due to internal compiler implementation limits. If this is exceeded, the compilers will report "Error: C2429E: structure or array too large".
You should use malloc() to create large arrays instead. If you cannot use malloc(), then you can define the array as a ZI area in an assembler file using SPACE, for example:
AREA mymem, DATA, NOINIT, ALIGN=2
array SPACE 100000000
END
Then declare the array in a header file like: extern int array[];
The SPACE directive reserves a zeroed block of memory. % is a synonym for SPACE.
This limit is raised to 256MB in ADS 1.2, and to 4GB in RVCT 2.x and later.
Article last edited on: 2009-07-08 11:56:05
Did you find this article helpful? Yes No
How can we improve this article?