_HeapFree

// C syntax 
#include <vmm.h>

ULONG EXTERNAL _HeapFree(ULONG hAddress, ULONG flags);

; Assembler syntax 
include vmm.inc

VMMCall _HeapFree, <hAddress, flags>

or      eax, eax            ; nonzero if freed, zero if error
jz      not_freed
 

Frees an existing memory block in the system heap. Uses EAX, ECX, EDX, and Flags.

hAddress
Address of the memory block to free. This address must have been previously returned by the _HeapAllocate or _HeapReAllocate service.
flags
Operation flags. Must be 0.

Although the system can usually recover from an attempt to free an invalid address, you should not rely on this.

See Also

_HeapAllocate, _HeapReAllocate