diff options
| author | David Spruill <[email protected]> | 2024-02-06 18:59:22 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-06 15:59:22 -0800 |
| commit | 07936d8becadc8f92d1d0416d2864b341840d6ad (patch) | |
| tree | adcb3f9b365b81c8f22758f8135a0136d07db3b6 | |
| parent | b12e3a38837146c1c1c3e202e2e2ad9f9ddf009f (diff) | |
replace deprecated exallocatepool* APIs with their modern replacement (#1088)
| -rw-r--r-- | video/KMDOD/memory.cxx | 7 |
1 files 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) |
