Windows Driver Kit: Installable File System Drivers
RtlFreeHeap
The RtlFreeHeap routine frees a memory block that was allocated from a heap by RtlAllocateHeap.
BOOLEAN
RtlFreeHeap(
IN PVOID HeapHandle,
IN ULONG Flags,
IN PVOID HeapBase
);
Parameters
- HeapHandle
- Handle for the heap whose memory block is to be freed. This parameter is a handle returned by RtlCreateHeap.
- Flags
- Set of flags controlling aspects of freeing a memory block. Specifying the following value overrides the corresponding value that was specified in the Flags parameter when the heap was created by RtlCreateHeap.
| Flag | Meaning |
| HEAP_NO_SERIALIZE | Specifies that mutual exclusion will not be used when RtlFreeHeap is accessing the heap. |
- HeapBase
- Pointer to the memory block to free. This pointer is returned by RtlAllocateHeap.
Return Value
RtlFreeHeap returns TRUE if the block was freed successfully, FALSE otherwise.
Requirements
Versions: This routine is available on Microsoft Windows XP and later.
IRQL: < DISPATCH_LEVEL
Headers: Declared in Ntifs.h. Include Ntifs.h.
See Also
RtlAllocateHeap, RtlCreateHeap, RtlDestroyHeap