资料介绍
Dynamic memory allocation is a nice functionality that
is provided with virtually all PC-based compilers. How-
ever, not all microcontroller compilers have such capa-
bility, 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 net-
work protocols that have a dynamically specified
nature. This application note presents a simple and effi-
cient method for dynamic memory allocation without
the need of an operating system. AN914
Dynamic Memory Allocation for the MPLAB C18 C Compiler
Author: Ross M. Fosler FIGURE 1: SIMPLE HEAP EXAMPLE
Microchip Technology Incorporated Allocation Bit Segment
Length/Reference
INTRODUCTION
Segment 1
Dynamic memory allocation is a nice functionality that
is provided with virtually all PC-based compilers. How-
ever, not all microcontroller compilers have such capa-
bility, most likely due to the lack of a