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>heapcheckfree() check free heap blocks for constant value</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 heapcheckfree()         Check Free Heap Blocks for Constant Value

 #include   <alloc.h>

 int heapcheckfree(fillval);
 unsigned int fillval;          The fill value to look for.


        This function walks through the free blocks on the heap, checking
        for a specified fill value. In the large and huge models,
        heapcheck() becomes farheapcheckfree(). Possible return values:

                _HEAPOK         Heap is alright.
                _HEAPEMPTY      Heap is empty.
                _HEAPCORRUPT    Heap has been corrupted.
                _BADVALUE       Value other than fill value found.

       Returns:     Greater than zero for success; negative otherwise.

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

        This example checks the heap for a fill value of 1.

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

        int fillval = 1;

        main(void)
        {
          if(heapfillfree(fillval) < 0)
            printf("Heap has problems.\n");
          return 0;
        }

See Also: farheapcheckfree()

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