5.5.16 How Do I Know How Much Memory Is Still Available?
A memory usage summary is available from the compiler after compilation
(--report-mem
option) or from MPLAB X IDE in the Dashboard window. All
of these summaries indicate the amount of memory used and the amount still available, but
none indicate whether this memory is one contiguous block or broken into many small chunks.
Since small blocks of free memory cannot be used for larger objects, out-of-memory errors
may be produced even though the total amount of memory free is apparently sufficient for
the objects to be positioned.
Consult the linker map file to determine exactly which memory is still available in each linker class. This file also indicates the largest contiguous block in that class, if there are memory page divisions. See the following document for information on the map file. It is available for download from the Microchip website, www.microchip.com.
“MPLAB® XC16 Assembler, Linker and Utilities User’s Guide” (DS50002106)