MmSizeOfMdl function (wdm.h)

The MmSizeOfMdl routine returns the number of bytes to allocate for an MDL describing a given address range.

Syntax

SIZE_T MmSizeOfMdl(
  [in] PVOID  Base,
  [in] SIZE_T Length
);

Parameters

[in] Base

Pointer to the base virtual address for the range.

[in] Length

Supplies the size, in bytes, of the range.

Return value

MmSizeOfMdl returns the number of bytes required to contain the MDL.

Remarks

Memory for the MDL itself must be allocated from nonpaged pool.

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 Any level

See also

MmCreateMdl

MmInitializeMdl