// C syntax
#include <vmm.h>
ULONG EXTERN _PageFree(PVOID hMem, DWORD flags);
// assembler syntax
include vmm.inc
VMMCall _PageFree, <hMem, flags>
or eax, eax ; nonzero if freed, zero if error
jz failed
Frees the specified memory block. Uses EAX.
Virtual devices that allocate PG_VM or PG_HOOKED pages must free these pages when the associated virtual machine is destroyed. PG_SYS pages do not need to be freed when Windows exits.
If a virtual device maps a memory block into the V86 address space (using the _MapIntoV86 service), it should unmap the memory block before attempting to free it.
It is not an error to free memory which is all or partially locked.
It is not necessary to decommit the memory inside a memory block before freeing it. Freeing a memory block automatically decommits its contents.
_PageAllocate, _PageReAllocate