Address Mappings and MDLs

The address-mapping and MDL-management routines are called by kernel-mode drivers to manage address mappings and memory descriptor lists (MDLs).

IoAllocateMdl

Allocates an MDL large enough to map the starting address and length supplied by the caller; optionally associates the MDL with a given IRP.

IoBuildPartialMdl

Builds an MDL for the specified starting virtual address and length in bytes from a given source MDL. Drivers that split large transfer requests into a number of smaller transfers can call this routine.

IoFreeMdl

Releases a given MDL allocated by the caller.

MmAllocatePagesForMdlEx

Allocates nonpaged, physical memory pages for an MDL.

MmBuildMdlForNonPagedPool

Fills in the corresponding physical addresses of a given MDL that specifies a range of virtual addresses in nonpaged pool.

MmCreateMdl

Obsolete. Allocates and initializes an MDL describing a buffer specified by the given virtual address and length in bytes; returns a pointer to the MDL.

MmGetMdlByteCount

Returns the length in bytes of the buffer mapped by a given MDL.

MmGetMdlByteOffset

Returns the byte offset within a page of the buffer described by a given MDL.

MmGetMdlVirtualAddress

Returns a (possibly invalid) virtual address for a buffer described by a given MDL; the returned address, used as an index to a physical address entry in the MDL, can be input to MapTransfer for drivers that use DMA.

MmGetPhysicalAddress

Returns the corresponding physical address for a given valid virtual address.

MmGetSystemAddressForMdlSafe

Returns a system-space virtual address that maps the physical pages described by a given MDL for drivers whose devices must use programmed I/O (PIO). If no virtual address exists, one is assigned.

MmInitializeMdl

Initializes a caller-created MDL to describe a buffer specified by the given virtual address and length in bytes.

MmIsAddressValid

Returns whether a page fault will occur if a read or write operation is done at the given virtual address.

MmMapIoSpace

Maps a physical address range to a cached or noncached virtual address range in nonpaged system space.

MmMapLockedPages

Obsolete. Maps already locked physical pages, described by a given MDL, to a returned virtual address range.

MmMapLockedPagesWithReservedMapping

Maps a virtual address range already reserved with MmAllocateMappingAddress.

MmPrepareMdlForReuse

Reinitializes a caller-created MDL for reuse.

MmProbeAndLockPages

Probes the pages specified in an MDL for a particular kind of access, makes the pages resident, and locks them in memory; returns the MDL updated with corresponding physical addresses. (Usually, only highest-level drivers call this routine.)

MmProtectMdlSystemAddress

Sets the protection type for the memory-address range.

MmSecureVirtualMemory

Secures a memory-address range so that it cannot be freed and its page protection cannot be made more restrictive.

MmSizeOfMdl

Returns the number of bytes required for an MDL describing the buffer specified by the given virtual address and length in bytes.

MmUnlockPages

Unlocks the previously probed and locked pages specified in an MDL.

MmUnmapIoSpace

Unmaps a virtual address range from a physical address range.

MmUnmapLockedPages

Releases a mapping set up by MmMapLockedPages.

MmUnmapReservedMapping

Unmaps a virtual address range mapped by MmMapLockedPagesWithReservedMapping.

MmUnsecureVirtualMemory

Unsecures a memory-address range secured by MmSecureVirtualMemory.

 

 

Send comments about this topic to Microsoft

Show: