--- parser3/src/include/pa_memory.h 2005/08/05 14:13:41 1.11.14.2 +++ parser3/src/include/pa_memory.h 2007/05/07 09:47:07 1.16 @@ -9,16 +9,11 @@ #ifndef PA_MEMORY_H #define PA_MEMORY_H -static const char * const IDENT_MEMORY_H="$Date: 2005/08/05 14:13:41 $"; +static const char * const IDENT_MEMORY_H="$Date: 2007/05/07 09:47:07 $"; // include #include "pa_config_includes.h" - -/// to debug backtrace pointers switch this on: -#ifdef _DEBUG -#define GC_DEBUG -#endif #include "gc.h" // defines @@ -82,15 +77,13 @@ inline void *pa_realloc(void *ptr, size_ return pa_fail_alloc("reallocate to", size); } -//{@ these operators are disabled, one should explicitely specify either new(UseGC) or new(PointerFreeGC) -#if _MSC_VER -# pragma warning(disable:4702) // disable warning -#endif -inline void *operator new(size_t) { abort(); } // disabled -inline void *operator new[] (size_t) { abort(); } // disabled -#if _MSC_VER -# pragma warning(default:4702) -#endif +//{@ these operators can be used from stl. to be on a safe side, assume that data may contain pointers +inline void *operator new[] (size_t size) { + return pa_malloc(size); +} +inline void *operator new(size_t size) { + return pa_malloc(size); +} //}@ #define UseGC ((int)1)