MmUnmapLockedPages routine

The MmUnmapLockedPages routine releases a mapping that was set up by a preceding call to the MmMapLockedPages or MmMapLockedPagesSpecifyCache routine.

Syntax


VOID MmUnmapLockedPages(
  _In_ PVOID BaseAddress,
  _In_ PMDL  MemoryDescriptorList
);

Parameters

BaseAddress [in]

Pointer to the base virtual address to which the physical pages were mapped.

MemoryDescriptorList [in]

Pointer to an MDL.

Return value

None

Remarks

Callers of MmUnmapLockedPages must be running at IRQL <= DISPATCH_LEVEL if the pages were mapped to system space. Otherwise, the caller must be running at IRQL <= APC_LEVEL.

Note that if the call to MmMapLockedPages or MmMapLockedPagesSpecifyCache specified user mode, the caller must be in the context of the original process before calling MmUnmapLockedPages. This is because the unmapping operation occurs in the context of the calling process, and, if the context is incorrect, the unmapping operation could delete the address range of a random process.

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

See Remarks section.

DDI compliance rules

HwStorPortProhibitedDDIs

See also

MmMapLockedPages
MmMapLockedPagesSpecifyCache

 

 

Send comments about this topic to Microsoft

Show: