mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-24 14:49:35 +08:00
9110a741e3
* README, README.Mac, README.OS2, README.QUICK, README.alpha, README.amiga, README.debugging, README.dj, README.hp, README.linux, README.rs6000, README.sgi, README.solaris2, README.uts, README.win32, SCoptions.amiga, backptr.h, barrett_diagram, dbg_mlc.h, gc.h, gc.man, gc_alloc.h, gc_cpp.h, gc_hdrs.h, gc_mark.h, gc_priv.h, gc_private.h, gc_typed.h, gcconfig.h, hpux_irix_threads.c, makefile.depend, nursery.c, solaris_threads.h, test.c, test_cpp.cc, weakpointer.h, cord/README, cord/SCOPTIONS.amiga, cord/SMakefile.amiga, cord/cord.h, cord/ec.h, cord/gc.h, cord/private/cord_pos.h, include/backptr.h, include/gc_copy_descr.h, include/gc_nursery.h: Remove obsolete/moved files. From-SVN: r42379
50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
/*************************************************************************
|
|
Copyright (c) 1994 by Xerox Corporation. All rights reserved.
|
|
|
|
THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
|
|
OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
|
|
|
Last modified on Sat Nov 19 19:31:14 PST 1994 by ellis
|
|
on Sat Jun 8 15:10:00 PST 1994 by boehm
|
|
|
|
Permission is hereby granted to copy this code for any purpose,
|
|
provided the above notices are retained on all copies.
|
|
|
|
This implementation module for gc_c++.h provides an implementation of
|
|
the global operators "new" and "delete" that calls the Boehm
|
|
allocator. All objects allocated by this implementation will be
|
|
non-collectable but part of the root set of the collector.
|
|
|
|
You should ensure (using implementation-dependent techniques) that the
|
|
linker finds this module before the library that defines the default
|
|
built-in "new" and "delete".
|
|
|
|
Authors: John R. Ellis and Jesse Hull
|
|
|
|
**************************************************************************/
|
|
/* Boehm, December 20, 1994 7:26 pm PST */
|
|
|
|
#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
|
|
|
|
void* operator new[]( size_t size ) {
|
|
return GC_MALLOC_UNCOLLECTABLE( size );}
|
|
|
|
void operator delete[]( void* obj ) {
|
|
GC_FREE( obj );}
|
|
|
|
#endif /* OPERATOR_NEW_ARRAY */
|
|
|
|
#endif /* _MSC_VER */
|
|
|
|
|