Virtual Memory and Page Locking


Many implementations of DPMI support virtual memory. In
these environments, it will be necessary to lock any memory
that can be touched while executing inside of DOS. This is
necessary because it may not be possible for the operating
system to demand load a page if DOS is busy.

Some DPMI implementations will not call DOS to read or write
virtual memory to disk and under these implementations the
page locking services may be ignored. Since the entire DPMI
session is virtualized, a page fault can be handled at any
point while executing the program. However, under all
implementations, DPMI applications should lock interrupt
code and data. The lock calls will always return success
under implementations that ignore these calls.