diff options
| author | David Spruill <[email protected]> | 2024-01-24 17:38:05 -0500 |
|---|---|---|
| committer | David Spruill <[email protected]> | 2024-01-24 17:38:05 -0500 |
| commit | d8a8746446849e167202af993f99955d19c12641 (patch) | |
| tree | 31a1f342ec865f8a55e276af7e6cb6c16078388b | |
| parent | 64c1afad486ce84bb7d7128afab0aba0fd00f9ef (diff) | |
Replace deprecated ExAllocatePool* APIs with ExAllocatePool2.
| -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) |
