Memory Management -- malloc(), free(), calloc(), realloc(); alloc.c, and heap.c

File alloc.c provides a full implementation of these functions. The only problems remaining are the question of heap location, heap size, and what happens when heap memory runs out.

All these points can be addressed in the heap.c file. The heap is viewed as a large array, and there is a default error handling function. Modify this function or the size of the heap to suit the needs of the application. The size of the heap is defined in libdefs.h, LIBDEF_HEAPSIZE.