diff options
| author | Daniel Rugerio <[email protected]> | 2021-08-13 15:05:12 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-13 15:05:12 -0700 |
| commit | 7895dd22785ddba5e973662ed942be3b3452b89d (patch) | |
| tree | 5c4572d5bfd076d3776a88c5757e37f3ed50c0e7 /audio/sysvad/EndpointsCommon/NewDelete.cpp | |
| parent | df47b2d284558fa9aacd19257153037e4ebba60e (diff) | |
audio: Updates for Windows 10 22000 (#655)
* Updates for Windows 10 22000.
* Change how WIL is consumed.
Diffstat (limited to 'audio/sysvad/EndpointsCommon/NewDelete.cpp')
| -rw-r--r-- | audio/sysvad/EndpointsCommon/NewDelete.cpp | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/audio/sysvad/EndpointsCommon/NewDelete.cpp b/audio/sysvad/EndpointsCommon/NewDelete.cpp index 7a4f89d6..64c64cc0 100644 --- a/audio/sysvad/EndpointsCommon/NewDelete.cpp +++ b/audio/sysvad/EndpointsCommon/NewDelete.cpp @@ -37,20 +37,12 @@ extern "C" { */ PVOID operator new ( - size_t iSize, - _When_((poolType & NonPagedPoolMustSucceed) != 0, - __drv_reportError("Must succeed pool allocations are forbidden. " - "Allocation failures cause a system crash")) - POOL_TYPE poolType, - ULONG tag + size_t iSize, + POOL_FLAGS poolFlags, + ULONG tag ) { - PVOID result = ExAllocatePoolWithTag(poolType, iSize, tag); - - if (result) - { - RtlZeroMemory(result, iSize); - } + PVOID result = ExAllocatePool2(poolFlags, iSize, tag); return result; } @@ -63,19 +55,11 @@ PVOID operator new */ PVOID operator new ( - size_t iSize, - _When_((poolType & NonPagedPoolMustSucceed) != 0, - __drv_reportError("Must succeed pool allocations are forbidden. " - "Allocation failures cause a system crash")) - POOL_TYPE poolType + size_t iSize, + POOL_FLAGS poolFlags ) { - PVOID result = ExAllocatePoolWithTag(poolType, iSize, SYSVAD_POOLTAG); - - if (result) - { - RtlZeroMemory(result, iSize); - } + PVOID result = ExAllocatePool2(poolFlags, iSize, SYSVAD_POOLTAG); return result; } |
