uClinux 375
10.7.4 Memory Limitations
uClinux does not provide a dynamic stack. Executables have a predefined
stack size set at compile time using
elf2flt. Programmers should avoid
huge allocations on the stack. Instead use the heap or if the requirement is
not dynamic, move it to the bss section.
C++ programs use
malloc even for built-in data-type declarations via the
new operator. Many C++ applications have had problems running on uClinux.
The lack of MMU and a wise
malloc results in an unsolvable memory
fragmentation issue, rendering the system useless. Hence C++ is not recom-
mended on an MMU-less system. Redesign any application that has to allocate
small chunks of
malloc or if possible write application-specific allocation
methods that will internally ...