Home |
RTTarget-32 Programming Manual Running Win32 Programs without Win32 Running a Program on the Target Alternate Heap Manager RTTHeap Compiling and Linking with On Time RTOS-32 |
Alternate Heap Manager RTTHeapThe C/C++ heap managers included in the run-time libraries can have problems with very small heaps, especially when RTTarget-32's fixed memory manager is used. The run-time system will usually attempt to preallocate a fair amount of heap space, even if the program does not make use of it. If insufficient heap space is available, the run-time system may refuse to start up even when the available heap is sufficiently large. Even with larger heaps, the wasted memory in reserved - but never committed - memory blocks remains a problem. Since many embedded systems cannot tolerate such a waste of memory, RTTarget-32 is shipped with an alternate heap manager in library file Rttheap.lib. Its use is recommended for heap sizes less than 64k. RTTHeap is usually not required for programs using RTTarget-32's virtual memory manager with uncommitted memory support. To use RTTHeap, simply link Rttheap.lib before the compiler's run-time system libraries. For Pascal programs, "use" unit RTTHeap as the first unit. There are no source code changes required.
|