#include <vmm.h>
ULONG EXTERNAL _PageDiscardPages(ULONG Page, ULONG VM, ULONG nPages,
ULONG flags);
Marks pages as not recently accessed, making them more likely page-out candidates. The pages can optionally be marked discarded as well, which reverts them to a virgin state, avoiding the need even to page them out. Uses EAX, ECX, EDX, and Flags.
Value | Meaning |
---|---|
PAGEDISCARD | Immediately makes the pages not present. If this value is not specified, the page remains present but is marked not recently accessed. |
PAGEZEROINIT | Fills the pages with zeros when they are next paged in. This value is ignored unless PAGEDISCARD is also specified. If this value is not given, the content of the pages is undefined. See the following comments section for additional remarks. |
All other values are reserved.
It is an error to attempt to discard pages that are not committed. This service ignores pages that are not present (that is, already paged out) or are locked (and cannot be paged out). This service affects only pages that are subject to demand paging.
The PAGEDISCARD flag causes the system to revert the pages to their virgin state as well as removing the pages from memory. The PAGEZEROINIT flag may only be passed for pages that were originally allocated as normal swappable memory, either uninitialized or zero-initialized; that is, PD_ZEROINIT or PD_NOINIT. It is an error to attempt to PAGEZEROINIT pages that belong to any other type of pager (because they won't know what to do).
_SetResetV86Pageable