diff options
Diffstat (limited to 'boehm-gc/include/gc_cpp.h')
-rw-r--r-- | boehm-gc/include/gc_cpp.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/boehm-gc/include/gc_cpp.h b/boehm-gc/include/gc_cpp.h index e2f456fb526..ad7df5d71fa 100644 --- a/boehm-gc/include/gc_cpp.h +++ b/boehm-gc/include/gc_cpp.h @@ -133,7 +133,8 @@ uses explicit invocation. #endif #if ! defined( OPERATOR_NEW_ARRAY ) \ - && (__BORLANDC__ >= 0x450 || (__GNUC__ >= 2 && __GNUC_MINOR__ >= 6)) + && (__BORLANDC__ >= 0x450 || (__GNUC__ >= 2 && __GNUC_MINOR__ >= 6) \ + || __WATCOMC__ >= 1050) # define OPERATOR_NEW_ARRAY #endif @@ -212,6 +213,8 @@ inline void* gc::operator new( size_t size ) { inline void* gc::operator new( size_t size, GCPlacement gcp ) { if (gcp == GC) return GC_MALLOC( size ); + else if (gcp == PointerFreeGC) + return GC_MALLOC_ATOMIC( size ); else return GC_MALLOC_UNCOLLECTABLE( size );} @@ -234,7 +237,7 @@ inline void gc::operator delete[]( void* obj ) { inline gc_cleanup::~gc_cleanup() { - GC_REGISTER_FINALIZER_IGNORE_SELF( this, 0, 0, 0, 0 );} + GC_REGISTER_FINALIZER_IGNORE_SELF( GC_base(this), 0, 0, 0, 0 );} inline void gc_cleanup::cleanup( void* obj, void* displ ) { ((gc_cleanup*) ((char*) obj + (ptrdiff_t) displ))->~gc_cleanup();} |