MmAllocateMappingAddress - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

PVOID MmAllocateMappingAddress(
  [in] SIZE_T NumberOfBytes,
  [in] ULONG  PoolTag
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-mmallocatemappingaddress)

MmAllocateMappingAddress function

Description

The MmAllocateMappingAddress routine reserves a range of system virtual address space of the specified size.

Parameters

NumberOfBytes [in]

Specifies the number of bytes to reserve.

PoolTag [in]

Specifies a four-character tag used to identify the buffer. Use a distinct PoolTag tag for each allocation code path. For a description of pool tags, see ExAllocatePoolWithTag.

Return value

MmAllocateMappingAddress returns a pointer to the beginning of the reserved memory buffer if the operation is successful; otherwise, it returns NULL.

Remarks

MmAllocateMappingAddress reserves a system virtual address range for the caller to use. No physical memory is allocated for the virtual address range and the virtual memory can't be accessed until it is mapped by the MmMapLockedPagesWithReservedMapping routine. The caller unmaps the reserved memory range by calling the MmUnmapReservedMapping routine. Finally, the caller can free the reserved range by calling MmFreeMappingAddress.

See also

MmAllocateMappingAddressEx

MmFreeMappingAddress

MmMapLockedPagesWithReservedMapping

MmUnmapReservedMapping