ARMCC: C4048U out of store while compiling with -g
Information in this knowledgebase article applies to:
When compiling a large C array, such as image data, the compiler outputs the following error:
Error: C4048U: out of store while compiling with -g. Allocation size was 1048576, system size is 341987156
The compiler ran out of its allocated memory. The "allocation size" is the amount of memory that the compiler was attempting to allocate at the moment that it ran out. The "system size" is the amount that it had successfully allocated up until that point.
There are several solutions to this issue:
armcc is in maintenance, so this type of issue will not be resolved. The vast majority of development effort is now focused on armclang.
Out of memory error
In both armcc and armclang (using "AC5-like Warnings"), users may encounter a later error, after overcoming error 4048:
..\Desktop\LotsOfBytes.c(9736309): error: #4: out of memory
This indicates that the PC's available physical memory (RAM) for the process has run out. Users can verify this issue in Windows Resource Monitor's Physical Memory plot. Close out unnecessary applications, especially tabs dealing with large files, and retry. Note that the Resource Monitor also consumes memory. Restarting the PC can free up Standby memory. Otherwise, a PC with more RAM may be required to complete the build.
Last Reviewed: Wednesday, April 26, 2017
of your data.