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>heapchecknode() check a node on the heap</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 heapchecknode()         Check a Node on the Heap

 #include   <alloc.h>

 int heapchecknode(node);
 void *node;         Node to check

        This function checks and verifies a single node in the heap. The
        possible return values are:

                _HEAPEMPTY      Heap is empty.
                _HEAPCORRUPT    Heap has been corrupted.
                _BADNODE        Node could not be found.
                _FREENTRY       Node is a free block.
                _USEDENTRY      Node is a used block.

       Returns:     Greater than zero for success; negative otherwise.

   -------------------------------- Example ---------------------------------
        This example checks a single node on the heap.

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

     int main(void)
     {
       if(heapchecknode(malloc(1000)) < 0)
               printf("Heap problems.\n");

       return 0;
     }

See Also: farheapchecknode()

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