// wdm.h
SIZE_T MmSizeOfMdl(
[in] PVOID Base,
[in] SIZE_T Length
);
View the official Windows Driver Kit DDI referenceNo description available.
The MmSizeOfMdl routine returns the number of bytes to allocate for an MDL describing a given address range.
Base [in]Pointer to the base virtual address for the range.
Length [in]Supplies the size, in bytes, of the range.
MmSizeOfMdl returns the number of bytes required to contain the MDL.
Memory for the MDL itself must be allocated from nonpaged pool.