summaryrefslogtreecommitdiff
path: root/boehm-gc/gc_cpp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'boehm-gc/gc_cpp.cc')
-rw-r--r--boehm-gc/gc_cpp.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/boehm-gc/gc_cpp.cc b/boehm-gc/gc_cpp.cc
index a766a01a328..547c56f96a1 100644
--- a/boehm-gc/gc_cpp.cc
+++ b/boehm-gc/gc_cpp.cc
@@ -32,6 +32,20 @@ void* operator new( size_t size ) {
void operator delete( void* obj ) {
GC_FREE( obj );}
+#ifdef _MSC_VER
+// This new operator is used by VC++ in case of Debug builds !
+void* operator new( size_t size,
+ int ,//nBlockUse,
+ const char * szFileName,
+ int nLine
+ ) {
+# ifndef GC_DEBUG
+ return GC_malloc_uncollectable( size );
+# else
+ return GC_debug_malloc_uncollectable(size, szFileName, nLine);
+# endif
+}
+#endif
#ifdef OPERATOR_NEW_ARRAY