3.5.17 How Do I Know How Much Memory Is Still Available?
Although the memory summary, printed by the compiler after compilation, and the memory display, available in MPLAB X IDE, both indicate the amount of memory used and the amount still available, neither feature indicates whether this memory is one contiguous block or broken into many small chunks. Small blocks of free memory cannot be used for larger objects and so out-of-memory errors can be produced even though the total amount of memory free is apparently sufficient for the objects to be positioned (see 3.6.6 How Do I Fix a “Can’t find space...” Error?).
The 7.3.2.5 Unused Address Ranges section in the map file indicates exactly what memory is still available in each linker class. It also indicated the largest contiguous block in that class if there are memory bank or page divisions.