include vmm.inc VMMcall _PageFree, <hMem, flags> or eax, eax ; nonzero if freed, zero if error jz not_freed |
The _PageFree service frees the specified memory block.
hMem
Specifies a handle identifying the memory block to free. This handle must have been previously created using the _PageAllocate or _PageReAllocate service.
flags
Specifies the operation flags. This parameter must be set to zero.
The EAX register contains a nonzero value if the service is successful. Otherwise, EAX contains zero to indicate an error, such as an invalid memory handle.
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.
EAX