Managing Memory with Multiple Heaps

VisualAge C++ gives you the option of creating and using your own pools of memory, called heaps. You can use your own heaps in place of or in addition to the default VisualAge C++ run-time heap to improve the performance of your program.

Using your own heaps is entirely optional, and your applications will work perfectly well using the default memory management provided (and used by) the VisualAge C++ run-time library.

You can have any number of heaps of any type. The only limit is the space available on your operating system.

Tiled heaps are only available on OS/2.

VisualAge C++ provides heap-specific versions of the memory management functions, such as malloc, and a number of new functions that you can use to create and manage your own heaps of memory. Debug versions of all the memory management functions are available, including the heap-specific ones.

Because multiple heaps and the functions that support them are extensions to the ANSI language standard, the language level must be set to "extended", using one of the following methods:



Types of Memory
Advantages of Using Multiple Heaps


Create a Fixed-Size Heap
Create an Expandable Heap
Set Incorporation Options for Heap Debugging
Improve Memory Management


Differentiating Between Memory Management Functions
C Library Functions: Transparent Memory Pooling