IoFreeMdl
TOC
Collapse the table of content
Expand the table of content

IoFreeMdl routine

The IoFreeMdl routine releases a caller-allocated memory descriptor list (MDL).

Syntax


VOID IoFreeMdl(
  _In_ PMDL Mdl
);

Parameters

Mdl [in]

Pointer to the MDL to be released.

Return value

None

Remarks

If a driver allocates an MDL to describe a buffer, it must explicitly release the MDL when operations on the buffer are done.

If the MDL is a partial MDL, IoFreeMdl unmaps any pages that have been mapped to the MDL.

If the physical pages that are described by the MDL are locked, the driver must unlock the pages before it frees the MDL.

This routine frees only the specified MDL. Any MDLs that are chained to this MDL must be explicitly freed through additional calls to this routine. For a code example that shows how to free an MDL chain, see Using MDLs.

Requirements

Target platform

Universal

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

<= DISPATCH_LEVEL

See also

IoAllocateMdl
IoBuildPartialMdl

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft