Listing 3: Conceptual use of the HeapManager


#include  "heapmgr.h"
/*    link  with  heapmgr.obj    */

main()
{
    HEAP  *heapP;
    char  *blockP;
    heapP  =  createHeap(100000);
    blockP  =  allocMem(heapP,100);
    /*    do  something  with  blockP    */
    freeMem(heapP,blockP);
    destroyHeap(heapP);
    return  0;
}
/* End of File */