From 07936d8becadc8f92d1d0416d2864b341840d6ad Mon Sep 17 00:00:00 2001 From: David Spruill <62445444+Spruill-1@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:59:22 -0500 Subject: replace deprecated exallocatepool* APIs with their modern replacement (#1088) --- video/KMDOD/memory.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/video/KMDOD/memory.cxx b/video/KMDOD/memory.cxx index aae795df..5b68c297 100644 --- a/video/KMDOD/memory.cxx +++ b/video/KMDOD/memory.cxx @@ -23,7 +23,10 @@ void* __cdecl operator new(size_t Size, POOL_TYPE PoolType) Size = (Size != 0) ? Size : 1; - void* pObject = ExAllocatePoolWithTag(PoolType, Size, BDDTAG); + // 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 if (pObject != NULL) @@ -44,7 +47,7 @@ void* __cdecl operator new[](size_t Size, POOL_TYPE PoolType) Size = (Size != 0) ? Size : 1; - void* pObject = ExAllocatePoolWithTag(PoolType, Size, BDDTAG); + void* pObject = ExAllocatePool2(PoolType, Size, BDDTAG); #if DBG if (pObject != NULL) -- cgit v1.3.1