Dynamic Memory Allocation for the MPLAB® C18 C Compiler
Dynamic memory allocation is a nice functionality that is provided with virtually
all PC-based compilers. However, not all microcontroller compilers have such capability,
most likely due to the lack of a sophisticated operating system with memory management.
Although most applications are static in nature, there are cases where a need
for dynamic allocation of memory resources exists. Examples include any number
of network protocols that have a dynamically specified nature. This application
note presents a simple and efficient method for dynamic memory allocation without
the need of an operating system.
MPLAB C18, Dynamic Memory Allocation, malloc, sralloc, heap