Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>heapcheck() check the heap</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 heapcheck()             Check the Heap

 #include   <alloc.h>

 int heapcheck(void);

        This function walks through the heap, checking all block's
        pointers, size, and other features. In the large and huge models,
        heapcheck() becomes farheapcheck(). Possible returns:

                _HEAPOK         Heap is alright.
                _HEAPEMPTY      Heap is empty.
                _HEAPCORRUPT    Heap has been corrupted.

       Returns:     Greater than zero for success; negative otherwise.

   -------------------------------- Example ---------------------------------

 #include <stdio.h>
 #include <alloc.h>

 int main(void)

    if(heapcheck() == _HEAPCORRUPT)
       printf("Heap has problems.\n");
    return 0;


See Also: farheapcheck()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson