From 22b89d354d52be7c38f8d3c1d86d92c5f8a56b42 Mon Sep 17 00:00:00 2001 From: "Jakob Lichtenberg (170957)" Date: Wed, 31 Jan 2024 23:45:24 -0800 Subject: [PATCH] Merge with upcoming PR https://github.com/microsoft/Windows-driver-samples/pull/1088 --- video/KMDOD/memory.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/video/KMDOD/memory.cxx b/video/KMDOD/memory.cxx index e799fa5a7..5cd12d444 100644 --- a/video/KMDOD/memory.cxx +++ b/video/KMDOD/memory.cxx @@ -23,6 +23,9 @@ void* __cdecl operator new(size_t Size, POOL_TYPE PoolType) Size = (Size != 0) ? Size : 1; + // Note that ExAllocatePool2 replaces ExAllocatePool* APIs in OS's starting + // with Windows 10, version 2004. If your driver targets previous versions it + // should use ExAllocatePoolZero instead. void* pObject = ExAllocatePool2(PoolType, Size, BDDTAG); #if DBG @@ -87,4 +90,3 @@ void __cdecl operator delete[](void* pObject) ExFreePool(pObject); } } -