include vmm.inc VMMcall _GetFreePageCount, <flags> mov dword ptr [FreePages], eax ; number of free pages mov dword ptr [LockablePages], edx ; number of lockable pages
Returns the number of pages in the free list. This service also returns the number of free pages that can be allocated as locked pages. Uses EAX, ECX, EDX, and flags.
flags
Operation flags. Must be zero.
Virtual devices can allocate pages by using the _PageAllocate, _PageCommit, _PageCommitContig, or _PageCommitPhys service.
In a demand-paged virtual memory system such as Windows, the number of free pages is usually very close to 0, so the count of pages available for locking is usually a better indicator of available memory. However, virtual devices must not rely on the count of free pages being less than or equal to the count of pages to lock. No guarantees can be made about the length of time the information returned by this service remains accurate.
See also _PageAllocate