The MmBuildMdlForNonPagedPool routine receives an MDL that specifies a nonpaged virtual memory buffer, and updates it to describe the underlying physical pages.
- MemoryDescriptorList [in, out]
A pointer to an MDL that specifies a virtual memory buffer in nonpaged memory. The caller used the IoAllocateMdl routine to create the MDL for this buffer.
At entry, the specified MDL must describe a buffer in nonpaged system memory, such as memory that is allocated by the ExAllocatePoolWithTag routine with PoolType = NonPagedPool or by the MmAllocateContiguousMemorySpecifyCache routine. MmBuildMdlForNonPagedPool updates the MDL to describe the underlying physical pages.
Because the pages described by the MDL are already nonpageable and are already mapped to the system address space, drivers must not try to lock them by using the MmProbeAndLockPages routine, or to create additional system-address-space mappings by using the MmMapLockedPagesSpecifyCache routine. Similarly, drivers must not try to unlock the pages by using the MmUnlockPages routine, or to release the existing system-address-space mapping by using the MmUnmapLockedPages routine. If a driver performs any of these illegal operations on an MDL that is built by MmBuildMdlForNonPagedPool, the resulting behavior is undefined.
Passing an MDL built by MmBuildMdlForNonPagedPool to the MmGetSystemAddressForMdlSafe routine is allowed. The MmGetSystemAddressForMdlSafe call, in this case, simply returns the starting virtual address of the buffer that is described by the MDL.
A driver can use the MmMapLockedPagesSpecifyCache routine to map an MDL that is built by MmBuildMdlForNonPagedPool into user virtual address space. However, the driver must perform this operation in a way that avoids certain security issues. For more information, see MmMapLockedPagesSpecifyCache.
|Available starting with Windows 2000.|