summaryrefslogtreecommitdiff
path: root/audio/sysvad/EndpointsCommon
diff options
context:
space:
mode:
authorya-solnyshko <[email protected]>2025-04-06 13:41:57 +0200
committerGitHub <[email protected]>2025-04-06 13:41:57 +0200
commit44844a5888b8a12652ee4e4d87dd53c08afa146d (patch)
treefa9246114c21fc120eeebb8c3b913196c57bbfe9 /audio/sysvad/EndpointsCommon
parent3dbe73da0848fce170ff4f59459bc597f0d0cd34 (diff)
parent89cb2a985612eb83e20b15f6445228ee7f681fba (diff)
Merge branch 'main' into fix-transaction-processing
Diffstat (limited to 'audio/sysvad/EndpointsCommon')
-rw-r--r--audio/sysvad/EndpointsCommon/EndpointsCommon.vcxproj4
-rw-r--r--audio/sysvad/EndpointsCommon/NewDelete.cpp24
-rw-r--r--audio/sysvad/EndpointsCommon/NewDelete.h15
3 files changed, 43 insertions, 0 deletions
diff --git a/audio/sysvad/EndpointsCommon/EndpointsCommon.vcxproj b/audio/sysvad/EndpointsCommon/EndpointsCommon.vcxproj
index aa5cc3e2..c1ba8b14 100644
--- a/audio/sysvad/EndpointsCommon/EndpointsCommon.vcxproj
+++ b/audio/sysvad/EndpointsCommon/EndpointsCommon.vcxproj
@@ -94,6 +94,7 @@
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND;_NEW_DELETE_OPERATORS_</PreprocessorDefinitions>
<ExceptionHandling>
@@ -114,6 +115,7 @@
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND;_NEW_DELETE_OPERATORS_</PreprocessorDefinitions>
<ExceptionHandling>
@@ -134,6 +136,7 @@
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND;_NEW_DELETE_OPERATORS_</PreprocessorDefinitions>
<ExceptionHandling>
@@ -154,6 +157,7 @@
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
+ <LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS;SYSVAD_USB_SIDEBAND;_NEW_DELETE_OPERATORS_</PreprocessorDefinitions>
<ExceptionHandling>
diff --git a/audio/sysvad/EndpointsCommon/NewDelete.cpp b/audio/sysvad/EndpointsCommon/NewDelete.cpp
index 64c64cc0..daa076e2 100644
--- a/audio/sysvad/EndpointsCommon/NewDelete.cpp
+++ b/audio/sysvad/EndpointsCommon/NewDelete.cpp
@@ -106,6 +106,30 @@ void __cdecl operator delete
/*****************************************************************************
* ::delete()
*****************************************************************************
+* Sized Delete function with alignment.
+*/
+#ifdef __cpp_aligned_new
+void __cdecl operator delete
+(
+ _Pre_maybenull_ __drv_freesMem(Mem) PVOID pVoid,
+ _In_ size_t cbSize,
+ _In_ std::align_val_t cbAlign
+)
+{
+ UNREFERENCED_PARAMETER(cbSize);
+ UNREFERENCED_PARAMETER(cbAlign);
+
+ if (pVoid)
+ {
+ ExFreePoolWithTag(pVoid, SYSVAD_POOLTAG);
+ }
+}
+#endif // __cpp_aligned_new
+
+
+/*****************************************************************************
+* ::delete()
+*****************************************************************************
* Sized Array Delete function.
*/
void __cdecl operator delete[]
diff --git a/audio/sysvad/EndpointsCommon/NewDelete.h b/audio/sysvad/EndpointsCommon/NewDelete.h
index be46cbf5..fefcda6e 100644
--- a/audio/sysvad/EndpointsCommon/NewDelete.h
+++ b/audio/sysvad/EndpointsCommon/NewDelete.h
@@ -73,6 +73,21 @@ void __cdecl operator delete
/*****************************************************************************
* ::delete()
*****************************************************************************
+* Sized Delete function with alignment.
+*/
+#ifdef __cpp_aligned_new
+void __cdecl operator delete
+(
+ _Pre_maybenull_ __drv_freesMem(Mem) PVOID pVoid,
+ _In_ size_t cbSize,
+ _In_ std::align_val_t cbAlign
+);
+#endif // __cpp_aligned_new
+
+
+/*****************************************************************************
+* ::delete()
+*****************************************************************************
* Basic Delete function.
*/
void __cdecl operator delete