MmFreeContiguousMemorySpecifyCache function (ntddk.h)

The MmFreeContiguousMemorySpecifyCache routine frees a buffer that was allocated by an MmAllocateContiguousMemorySpecifyCacheXxx routine.

Syntax

void MmFreeContiguousMemorySpecifyCache(
  [in] PVOID               BaseAddress,
  [in] SIZE_T              NumberOfBytes,
  [in] MEMORY_CACHING_TYPE CacheType
);

Parameters

[in] BaseAddress

Specifies the base address of the buffer to be freed. Must match the address returned by the MmAllocateContiguousMemorySpecifyCacheXxx call that allocated the buffer.

[in] NumberOfBytes

Specifies the size in bytes of the buffer to be freed. Must match the size requested when the buffer was allocated by the MmAllocateContiguousMemorySpecifyCacheXxx routine.

[in] CacheType

Specifies the cache type of the buffer to be freed. Must match the cache type requested when the buffer was allocated by the MmAllocateContiguousMemorySpecifyCacheXxx routine.

Return value

None

Remarks

The MmFreeContiguousMemorySpecifyCache routine frees a block of physically contiguous memory that was allocated by a previous call to the MmAllocateContiguousMemorySpecifyCache or MmAllocateContiguousMemorySpecifyCacheNode routine. However, MmFreeContiguousMemory is the preferred routine to use to free memory that was allocated by an MmAllocateContiguousMemorySpecifyCacheXxx routine. MmFreeContiguousMemory is faster than MmFreeContiguousMemorySpecifyCache and requires fewer parameters.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header ntddk.h (include Wdm.h, Ntddk.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DISPATCH_LEVEL

See also

MmAllocateContiguousMemorySpecifyCache

MmAllocateContiguousMemorySpecifyCacheNode

MmFreeContiguousMemory