summaryrefslogtreecommitdiff
path: root/audio/sysvad/EndpointsCommon/NewDelete.cpp
diff options
context:
space:
mode:
authorGirish Pattabiraman <[email protected]>2017-02-08 15:43:47 -0800
committerGirish Pattabiraman <[email protected]>2017-02-08 15:43:47 -0800
commita982f7e243ac4cb584e7fa89265dc6ccd4404880 (patch)
tree4a04c0db8015fddcc00efd9614a60fa18ab9f590 /audio/sysvad/EndpointsCommon/NewDelete.cpp
parentfe0b6f422c742f5c97f33cfe89022cbd238c5774 (diff)
Removing local "new and delete operators" and suppressing warning 4595
Diffstat (limited to 'audio/sysvad/EndpointsCommon/NewDelete.cpp')
-rw-r--r--audio/sysvad/EndpointsCommon/NewDelete.cpp178
1 files changed, 0 insertions, 178 deletions
diff --git a/audio/sysvad/EndpointsCommon/NewDelete.cpp b/audio/sysvad/EndpointsCommon/NewDelete.cpp
deleted file mode 100644
index 406b4245..00000000
--- a/audio/sysvad/EndpointsCommon/NewDelete.cpp
+++ /dev/null
@@ -1,178 +0,0 @@
-/*****************************************************************************
- * NewDelete.cpp - CPP placement new and delete operators implementation
- *****************************************************************************
- * Copyright (c) Microsoft Corporation All Rights Reserved
- *
- * Module Name:
- *
- * NewDelete.cpp
- *
- * Abstract:
- *
- * Definition of placement new and delete operators.
- *
- */
-
-#ifdef _NEW_DELETE_OPERATORS_
-#ifdef __cplusplus
-extern "C" {
-#include <wdm.h>
-}
-#else
-#include <wdm.h>
-#endif
-
-#include "newDelete.h"
-#include "sysvad.h"
-
-#pragma code_seg()
-/*****************************************************************************
- * Functions
- */
-
-/*****************************************************************************
- * ::new()
- *****************************************************************************
- * New function for creating objects with a specified allocation tag.
- */
-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
-)
-{
- PVOID result = ExAllocatePoolWithTag(poolType, iSize, tag);
-
- if (result)
- {
- RtlZeroMemory(result,iSize);
- }
-
- return result;
-}
-
-
-/*****************************************************************************
- * ::new()
- *****************************************************************************
- * New function for creating objects with a specified allocation tag.
- */
-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
-)
-{
- PVOID result = ExAllocatePoolWithTag(poolType, iSize, SYSVAD_POOLTAG);
-
- if (result)
- {
- RtlZeroMemory(result,iSize);
- }
-
- return result;
-}
-
-
-/*****************************************************************************
- * ::delete()
- *****************************************************************************
- * Delete with tag function.
- */
-void __cdecl operator delete
-(
- PVOID pVoid,
- ULONG tag
-)
-{
- if (pVoid)
- {
- ExFreePoolWithTag(pVoid, tag);
- }
-}
-
-
-/*****************************************************************************
- * ::delete()
- *****************************************************************************
- * Sized Delete function.
- */
-void __cdecl operator delete
-(
- _Pre_maybenull_ __drv_freesMem(Mem) PVOID pVoid,
- _In_ size_t cbSize
-)
-{
- UNREFERENCED_PARAMETER(cbSize);
-
- if (pVoid)
- {
- ExFreePoolWithTag(pVoid, SYSVAD_POOLTAG);
- }
-}
-
-
-/*****************************************************************************
- * ::delete()
- *****************************************************************************
- * Basic Delete function.
- */
-/* Commented out as "void __cdecl operator delete(void *) is already defined
- * in stdunk.lib
- */
-// void __cdecl operator delete
-// (
-// PVOID pVoid
-// )
-// {
-// if (pVoid)
-// {
-// ExFreePoolWithTag(pVoid, SYSVAD_POOLTAG);
-// }
-// }
-
-
-/*****************************************************************************
- * ::delete()
- *****************************************************************************
- * Sized Array Delete function.
- */
-void __cdecl operator delete[]
-(
- _Pre_maybenull_ __drv_freesMem(Mem) PVOID pVoid,
- _In_ size_t cbSize
-)
-{
- UNREFERENCED_PARAMETER(cbSize);
-
- if (pVoid)
- {
- ExFreePoolWithTag(pVoid, SYSVAD_POOLTAG);
- }
-}
-
-
-/*****************************************************************************
- * ::delete()
- *****************************************************************************
- * Array Delete function.
- */
-void __cdecl operator delete[]
-(
- _Pre_maybenull_ __drv_freesMem(Mem) PVOID pVoid
-)
-{
- if (pVoid)
- {
- ExFreePoolWithTag(pVoid, SYSVAD_POOLTAG);
- }
-}
-
-#endif _NEW_DELETE_OPERATORS_