Virtual Devices (3.1) (vdag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
_PageDiscardPages
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
include vmm.inc
 
VMMcall _PageDiscardPages, <LinPgNum, VM, nPages, flags>
 
or      eax, eax            ; nonzero if discarded, zero if error
jz      not_discarded
 
The _PageDiscardPages service marks pages as no longer in use, allowing the
system to discard the pages. Subsequent attempts to access the page do not
cause the system to read the previous contents of the page from disk.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
LinPgNum   Specifies linear page number of the first page to discard. If
           this parameter is less than 110h or corresponds to a virtual
           machine high linear address, the VM parameter must specify a
           valid virtual machine handle. All pages of the specified range
           must be marked V86Pageable.
 
VM         Specifies a handle identifying the virtual machine containing the
           pages to discard.
 
nPages     Specifies the number of pages to discard.
 
flags      Specifies the operation flags. This parameter can be a
           combination of the following values:
 
           Value         Meaning
           ─────────────────────────────────────────────────────────────────
           PageZeroInit  Fills the specified pages with zeros when a
                         subsequent attempt to page in the pages is made.
                         This value only applies when the PageDiscard value
                         is also given. If this value is not given, the
                         content of the pages is undefined.
 
           PageDiscard   Marks pages for a full discard by clearing both the
                         P_ACC and P_DIRTY bits in the page table entries.
                         If this value is not given, this service only
                         clears the P_ACC bit in the page table entries.
 
           All other values are reserved.
 
Return Value
 
The EAX register contains a nonzero value if the service is successful.
Otherwise EAX contains zero indicating an error, such as an invalid range or
an invalid virtual machine handle.
 
Comments
 
This service ignores pages in the range which are not present or are locked.
This service affects only pages that are subject to demand paging.
 
Uses
 
EAX
 
                                      ♦