diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-07-10 14:21:11 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-07-10 14:21:11 +0000 |
commit | bb118b7356439a930be13962ced5f36aab9f74bf (patch) | |
tree | 5a9fad8dd6dc7f236bfc8e6b22c04cad0b837928 /gc/gc_cpp.cc | |
parent | delete old ftp site (diff) | |
download | w3m-bb118b7356439a930be13962ced5f36aab9f74bf.tar.gz w3m-bb118b7356439a930be13962ced5f36aab9f74bf.zip |
import gc6.1alpha5
Diffstat (limited to 'gc/gc_cpp.cc')
-rw-r--r-- | gc/gc_cpp.cc | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/gc/gc_cpp.cc b/gc/gc_cpp.cc index a97091c..f8b803a 100644 --- a/gc/gc_cpp.cc +++ b/gc/gc_cpp.cc @@ -26,15 +26,13 @@ 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 );} void operator delete( void* obj ) { GC_FREE( obj );} -#ifdef OPERATOR_NEW_ARRAY +#ifdef GC_OPERATOR_NEW_ARRAY void* operator new[]( size_t size ) { return GC_MALLOC_UNCOLLECTABLE( size );} @@ -42,8 +40,22 @@ void* operator new[]( size_t size ) { void operator delete[]( void* obj ) { GC_FREE( obj );} -#endif /* OPERATOR_NEW_ARRAY */ +#endif /* GC_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 */ |