Bewerken

Delen via


IoFreeMdl function (wdm.h)

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

Syntax

void IoFreeMdl(
  [in] PMDL Mdl
);

Parameters

[in] Mdl

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

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DISPATCH_LEVEL

See also

IoAllocateMdl

IoBuildPartialMdl