summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Danes <onemihaid@hotmail.com>2016-02-18 23:42:35 +0200
committerMike Danes <onemihaid@hotmail.com>2016-02-18 23:42:35 +0200
commite73fbfa220876a18366a0037df10ca6f03bcb594 (patch)
tree8d4a551ad85a6c805571cd87e591ea480b7866f9 /src
parent3f46cdaf01493289c0382fda9757ad660d364d98 (diff)
downloadcoreclr-e73fbfa220876a18366a0037df10ca6f03bcb594.tar.gz
coreclr-e73fbfa220876a18366a0037df10ca6f03bcb594.tar.bz2
coreclr-e73fbfa220876a18366a0037df10ca6f03bcb594.zip
Do not define global inline new/delete operators
VS2015 Update 2 generates C4595 for such code and the build fails due to /WX
Diffstat (limited to 'src')
-rw-r--r--src/ToolBox/SOS/Strike/util.cpp11
-rw-r--r--src/ToolBox/SOS/Strike/util.h13
2 files changed, 11 insertions, 13 deletions
diff --git a/src/ToolBox/SOS/Strike/util.cpp b/src/ToolBox/SOS/Strike/util.cpp
index 1239c693c7..1763646632 100644
--- a/src/ToolBox/SOS/Strike/util.cpp
+++ b/src/ToolBox/SOS/Strike/util.cpp
@@ -83,6 +83,17 @@ const UINT kcMaxRevertedRejitData = 10;
#ifndef FEATURE_PAL
+// ensure we always allocate on the process heap
+void* __cdecl operator new(size_t size) throw()
+{ return HeapAlloc(GetProcessHeap(), 0, size); }
+void __cdecl operator delete(void* pObj) throw()
+{ HeapFree(GetProcessHeap(), 0, pObj); }
+
+void* __cdecl operator new[](size_t size) throw()
+{ return HeapAlloc(GetProcessHeap(), 0, size); }
+void __cdecl operator delete[](void* pObj) throw()
+{ HeapFree(GetProcessHeap(), 0, pObj); }
+
/**********************************************************************\
* Here we define types and functions that support custom COM *
* activation rules, as defined by the CIOptions enum. *
diff --git a/src/ToolBox/SOS/Strike/util.h b/src/ToolBox/SOS/Strike/util.h
index 583c7a651a..68a723226d 100644
--- a/src/ToolBox/SOS/Strike/util.h
+++ b/src/ToolBox/SOS/Strike/util.h
@@ -1632,19 +1632,6 @@ WCHAR *CreateMethodTableName(TADDR mt, TADDR cmt = NULL);
void isRetAddr(DWORD_PTR retAddr, DWORD_PTR* whereCalled);
DWORD_PTR GetValueFromExpression (___in __in_z const char *const str);
-#ifndef FEATURE_PAL
-// ensure we always allocate on the process heap
-FORCEINLINE void* __cdecl operator new(size_t size) throw()
-{ return HeapAlloc(GetProcessHeap(), 0, size); }
-FORCEINLINE void __cdecl operator delete(void* pObj) throw()
-{ HeapFree(GetProcessHeap(), 0, pObj); }
-
-FORCEINLINE void* __cdecl operator new[](size_t size) throw()
-{ return HeapAlloc(GetProcessHeap(), 0, size); }
-FORCEINLINE void __cdecl operator delete[](void* pObj) throw()
-{ HeapFree(GetProcessHeap(), 0, pObj); }
-#endif
-
enum ModuleHeapType
{
ModuleHeapType_ThunkHeap,