MmFreeContiguousMemorySpecifyCache 函数 (wdm.h)

MmFreeContiguousMemorySpecifyCache 例程释放由 MmAllocateContiguousMemorySpecifyCacheXxx 例程分配的缓冲区。

语法

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

参数

[in] BaseAddress

指定要释放的缓冲区的基址。 必须与分配缓冲区的 MmAllocateContiguousMemorySpecifyCacheXxx 调用返回的地址匹配。

[in] NumberOfBytes

指定要释放的缓冲区的大小(以字节为单位)。 必须与 MmAllocateContiguousMemorySpecifyCacheXxx 例程分配缓冲区时请求的大小匹配。

[in] CacheType

指定要释放的缓冲区的缓存类型。 必须与 MmAllocateContiguousMemorySpecifyCacheXxx 例程分配缓冲区时请求的缓存类型匹配。

返回值

备注

MmFreeContiguousMemorySpecifyCache 例程释放由以前调用 MmAllocateContiguousMemorySpecifyCacheMmAllocateContiguousMemorySpecifyCacheNode 例程分配的物理连续内存块。 但是, MmFreeContiguousMemory 是用于释放由 MmAllocateContiguousMemorySpecifyCacheXxx 例程分配的内存的首选例程。 MmFreeContiguousMemoryMmFreeContiguousMemorySpecifyCache 更快,所需的参数更少。

要求

要求
最低受支持的客户端 从 Windows 2000 开始可用。
目标平台 通用
标头 wdm.h (包括 Wdm.h、Ntddk.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DISPATCH_LEVEL

另请参阅

MmAllocateContiguousMemorySpecifyCache

MmAllocateContiguousMemorySpecifyCacheNode

MmFreeContiguousMemory