_PageAttach


#include <vmm.h>

ULONG EXTERNAL _PageAttach(ULONG page, PCD hcontextsrc, ULONG npages);

Maps a range of linear pages in the current memory context to the same physical storage that those pages are mapped to in a specified context (the source context). Do not call this service.

page and npages

Linear page number of the first page to map, and the number of pages to map.

hcontextsrc

Handle of the source memory context.

This service should only be called by the Win32 program loader, which uses it to map the pages containing a program image from one context into another.

The pages in the source context must be committed, and the pages in the current context must be reserved but not committed. After _PageAttach is called, the pages in the current context can be regarded as committed pages — for example, they can be decommitted, freed, or mapped into another memory context.