MmAllocateNonCachedMemory function (ntddk.h)
The MmAllocateNonCachedMemory routine allocates a virtual address range of noncached and cache-aligned memory.
PVOID MmAllocateNonCachedMemory( SIZE_T NumberOfBytes );
[in] Specifies the size in bytes of the range to be allocated.
If the requested memory cannot be allocated, the return value is NULL. Otherwise, it is the base virtual address of the allocated range.
MmAllocateNonCachedMemory can be called from a DriverEntry routine to allocate a noncached block of virtual memory for various device-specific buffers. The function always returns a full multiple of the virtual memory page size, of nonpaged system-address-space memory, regardless of the requested allocation size.
Noncached allocations are aligned on an integral multiple of the processor's data-cache-line size to prevent cache and coherency problems.
The physical memory pages that MmAllocateNonCachedMemory returns are typically not contiguous pages.
|Minimum supported client||Available starting with Windows 2000.|
|Header||ntddk.h (include Ntddk.h)|
|DDI compliance rules||IrqlMmApcLte, HwStorPortProhibitedDDIs, SpNoWait, StorPortStartIo|