summaryrefslogtreecommitdiff
path: root/include/gc_cpp.h
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-07-26 17:07:21 +0400
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 17:07:21 +0400
commit3313dcc53de4d5d5f76f58a856beb06688d1f8c7 (patch)
tree112d67f2a8b062a9e238469308394e762e26e2f5 /include/gc_cpp.h
parent9f27ae7aee7a12b3c99d0ce7dc4c7384e3189fa2 (diff)
downloadbdwgc-3313dcc53de4d5d5f76f58a856beb06688d1f8c7.tar.gz
gc6.1alpha4 tarball importgc6_1alpha4
Diffstat (limited to 'include/gc_cpp.h')
-rw-r--r--include/gc_cpp.h43
1 files changed, 12 insertions, 31 deletions
diff --git a/include/gc_cpp.h b/include/gc_cpp.h
index ceb73f50..ebe83b70 100644
--- a/include/gc_cpp.h
+++ b/include/gc_cpp.h
@@ -211,51 +211,32 @@ inline void* operator new(
classes derived from "gc_cleanup" or containing members derived
from "gc_cleanup". */
-#ifdef GC_OPERATOR_NEW_ARRAY
-#ifdef _MSC_VER
/** This ensures that the system default operator new[] doesn't get
* undefined, which is what seems to happen on VC++ 6 for some reason
* if we define a multi-argument operator new[].
* There seems to be really redirect new in this environment without
* including this everywhere.
*/
- inline void *operator new[]( size_t size )
- {
- return GC_MALLOC_UNCOLLECTABLE( size );
- }
-
- inline void operator delete[](void* obj)
- {
- GC_FREE(obj);
- };
-
- inline void* operator new( size_t size)
- {
- return GC_MALLOC_UNCOLLECTABLE( size);
- };
+ void *operator new[]( size_t size );
+
+ void operator delete[](void* obj);
- inline void operator delete(void* obj)
- {
- GC_FREE(obj);
- };
+ void* operator new( size_t size);
+ void operator delete(void* obj);
-// This new operator is used by VC++ in case of Debug builds !
- inline void* operator new( size_t size,
+#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
- }
-
+ int nLine );
#endif /* _MSC_VER */
+
+#ifdef GC_OPERATOR_NEW_ARRAY
+
inline void* operator new[](
size_t size,
GCPlacement gcp,