Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The MmAllocateMappingAddress routine reserves a range of system virtual address space of the specified size.
Syntax
PVOID MmAllocateMappingAddress(
[in] SIZE_T NumberOfBytes,
[in] ULONG PoolTag
);
Parameters
[in] NumberOfBytes
Specifies the number of bytes to reserve.
[in] PoolTag
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.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows XP |
| Target Platform | Universal |
| Header | wdm.h (include Wdm.h, Ntddk.h, Ntifs.h) |
| Library | NtosKrnl.lib |
| DLL | NtosKrnl.exe |
| IRQL | <=APC_LEVEL |