_PageGetSizeAddr


include vmm.inc

VMMcall _PageGetSizeAddr, <hMem, flags>

test    eax, eax            ; returns zero if error

mov     [Pages], eax        ; number of pages in memory block
mov     [Address], edx      ; ring-0 linear address of memory block

Returns the size and linear address of a memory block. Uses EAX, ECX, EDX, and Flags.

hMem

Base linear address of the memory block for which to return information. This parameter may be a handle returned by the _PageAllocate or _PageReAllocate service, or may be a linear address returned by the _PageReserve service.

flags

Operation flags. Must be zero.

The return value specifies the number of reserved pages for the memory block, which may be greater than the number of committed pages. For example, if the _PageReAllocate service is used to reduce the size of a memory block, the number of virtual pages reserved for that block may remain unchanged.

See also _PageAllocate, _PageReAllocate