Validates the library internal heap. The function scans all the memory blocks in the heap and verifies that the heap control structures maintained by the heap manager are in a consistent state. You can also use the ValidateMem function to validate a single memory block without checking the validity of the entire heap.
ValidateMem(nAddress)
Parameters
- nAddress
A pointer to a memory block returned from AllocMem. This parameter may be 0.
If this parameter is 0, the function attempts to validate the entire heap.
If this parameter is not 0, the function attempts to validate the memory block pointed to by nAddress.
It does not attempt to validate the rest of the heap.
Return Value
Returns .T. if the specified heap or memory block is valid, .F. otherwise.
Remarks
When you use ValidateMem to validate a single memory block within a heap, it checks only the control structures pertaining to that element. HeapValidate can only validate allocated memory blocks. Calling ValidateMem on a freed memory block will return .F. because there are no control structures to validate.
See Also
Reference
AllocHGlobal
AllocMem
AllocMemTo
AMemBlocks
CompactMem
FreeHGlobal
FreeMem
FreePMem
FreeRefArray
LockHGlobal
ReAllocHGlobal
ReAllocMem
SizeOfMem
UnlockHGlobal