diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2011-07-26 17:07:21 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-07-26 17:07:21 +0400 |
commit | 3313dcc53de4d5d5f76f58a856beb06688d1f8c7 (patch) | |
tree | 112d67f2a8b062a9e238469308394e762e26e2f5 /gc_cpp.cc | |
parent | 9f27ae7aee7a12b3c99d0ce7dc4c7384e3189fa2 (diff) | |
download | bdwgc-3313dcc53de4d5d5f76f58a856beb06688d1f8c7.tar.gz |
gc6.1alpha4 tarball importgc6_1alpha4
Diffstat (limited to 'gc_cpp.cc')
-rw-r--r-- | gc_cpp.cc | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -26,8 +26,6 @@ Authors: John R. Ellis and Jesse Hull #include "gc_cpp.h" -#ifndef _MSC_VER -/* In the Visual C++ case, we moved this into the header. */ void* operator new( size_t size ) { return GC_MALLOC_UNCOLLECTABLE( size );} @@ -44,6 +42,20 @@ void operator delete[]( void* obj ) { #endif /* OPERATOR_NEW_ARRAY */ -#endif /* _MSC_VER */ +#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 /* _MSC_VER */ |