
358 Embedded Linux System Design and Development
10.3 Memory Management
In this section we understand the changes done in the kernel and libc with
respect to memory management in uClinux. We divide our discussions based
on the two memory sections, heap and stack.
10.3.1 Heap
Memory Allocation
malloc, realloc, calloc, and free are the library calls used for heap
allocation/deallocation. The base function is
malloc and we need to under-
stand how
malloc works in standard Linux and why it cannot be used in
uClinux.
The
malloc provides for dynamic heap allocation in a process. It essentially
uses the low-level system calls
sbrk()/brk() to manage the size ...