#include <vmm.h>
ULONG EXTERNAL _PageCommitContig(ULONG page, ULONG npages, ULONG flags,
ULONG alignmask, ULONG minphys, ULONG maxphys);
Commits physically contiguous pages to a range of linear addresses. omitting physically contiguous pages is typically required only when interacting with hardware devices that impose external constraints on the physical properties of the memory on which they operate.
PC_USER | The pages are accessible at ring 3. |
PC_WRITEABLE | The pages are writeable. |
PCC_ZEROINIT | The pages are zero initialized. |
PCC_NOLIN | The pages are not mapped to any linear addresses. If PCC_NOLIN is passed, raw physical pages are allocated and the raw physical address is returned. Pages allocated in this way cannot be freed; they belong permanently to the caller. The PCC_NOLIN flag must not be combined with any of the other flags. |
0x00 | 4 K alignment |
0x01 | 8 K alignment |
0x03 | 16 K alignment |
0x07 | 32 K alignment |
0x0F | 64 K alignment |
0x1F | 128 K alignment |
The pages allocated will be greater than or equal to minphys and strictly less than maxphys. For example, to ensure that the pages returned will lie below the 16MB boundary, pass minphys=0x0000 and maxphys=0x1000. If you do not wish to impose restrictions on the physical page numbers, pass minphys=0 and maxphys=-1.
This service is typically used when communicating with hardware devices which have peculiar requirements on the physical address on which they operate. The _PageCommit service does not ensure the physical properties of the pages committed.
Pages allocated by this service are allocated as PC_FIXED.