farheapcheckfree
raw OCR
Checks the free blocks on the far heap for a constant value.
Defined in header <alloc.h>
Syntax
#include <alloc.h>
int farheapcheckfree(unsigned int fillvalue);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ |
Return value
The return value is less than zero for an error and greater than zero for success.
| _HEAPEMPTY | is returned if there is no heap (value 1). |
| _HEAPOK | is returned if the heap is accurate (value 2). |
| HEAPCORRUPT | is returned if the heap has been corrupted (value -1). |
| _BADVALUE (value -3). | is returned if a value other than the fill value was found |
See also
farheapfillfreeheapcheckfree^include<mem.h>ttinclude<stdio.h>tinclude<alloc.h>#defineNUM_PTRS10#defineNUMJYTES16intmaincharfar*array[IPTRS]intijres;foriffarmalloc==NULL){printfC'Nomemoryforallocation\n");return1;forfarfree;if<0){printfC'Heapcorrupted\n");return1;}forforarray[i][j]=0;res=farheapcheckfree;ifswitch{caseHEAPCORRUPT:printfC'Heapcorrupted\n");return1;case_BADVALUE:printfC'Badvalueinfreespace.\n");return1;default:printf;return1;}printf;return0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/alloc.h/farheapcheckfree/
· short form /3.1/farheapcheckfree/