Espandi Riduci a icona

MmPrepareMdlForReuse macro

The MmPrepareMdlForReuse macro releases the resources that are associated with a partial MDL so that the MDL can be reused.

Syntax


VOID MmPrepareMdlForReuse(
  [in]  PMDL Mdl
);

Parameters

Mdl [in]

A pointer to a partial MDL that is to be prepared for reuse.

Return value

None

Remarks

This macro is used by drivers that repeatedly use the same allocated MDL for the TargetMdl parameter in calls to the IoBuildPartialMdl routine. If, in a call to MmPrepareMdlForReuse, the specified partial MDL has an associated mapping to system address space, MmPrepareMdlForReuse releases the mapping so that the MDL can be reused.

MmPrepareMdlForReuse accepts only partial MDLs that are built by IoBuildPartialMdl. If MmPrepareMdlForReuse receives an MDL that is mapped to the system address space but was not built by IoBuildPartialMdl, MmPrepareMdlForReuse does not release the mapping, and, in checked builds, causes an assertion to fail.

For more information about partial MDLs, see Using MDLs.

Requirements

Version

Available in Windows 2000 and later versions of Windows.

Header

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

IRQL

<= DISPATCH_LEVEL

DDI compliance rules

MdlAfterReqCompletedIntIoctlA, MdlAfterReqCompletedIoctlA, MdlAfterReqCompletedReadA, MdlAfterReqCompletedWriteA

See also

IoAllocateMdl
IoBuildPartialMdl
IoFreeMdl
MmCreateMdl
MmInitializeMdl

 

 

Send comments about this topic to Microsoft

Mostra:
© 2014 Microsoft