The Kernel Memory Allocation library provides applications a way to increase the amount of Kernel memory available. The ROM by default supplies a relatively low amount of kernel memory which may limit the number of processes and sockets that can be used. This library allows processes and sockets to be allocated until the limit in the firmware.
The library is installed by adding a call to kmem_install() to any existing program. kmem_install() has to be called before rom_init(). No other changes are required. Example:
kmem_install(ROM400_KMEM_MODEL_SMALLEST + 2);
init_rom(RAM_START, RAM_END);
The Kernel Memory Allocation sample application shows the benefits of using kmem_init versus the normal initialization routine.