include vmm.inc VMMcall _GetFreePageCount, <flags> mov dword ptr [FreePages], eax ; number of free pages mov dword ptr [LockablePages], edx ; number of lockable pages |
The _GetFreePageCount service 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. Virtual devices can allocate free pages using the _PageAllocate service.
flags
Specifies the operation flags. This parameter must be set to 0.
The EAX register contains the count of free pages, and the EDX register contains the count of pages available for allocation as locked pages.
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.
EAX, EDX