Allocating Heap Memory
- Heap
- A contiguous block of memory can be set aside to be used as a "scratch pad" by the application program at run-time. Many applications and functions require the use of a heap. When a heap is required the developer must configure the heap inside the MPLAB® X project.
Care should be taken when creating a heap. Memory used in the heap is unavailable for global variables or the stack. Making a heap larger than it needs to be may make it difficult for the linker to complete the memory allocation.
Setting up the heap
1
Step 1: Open the "Project Properties" Window
From MPLAB X with the Project Open:
- Right Click on the project name in the Project Window and Open the Project Properties Window.
- When the Project Properties window opens up locate the categories section of the window