diff options
| author | Dave Love | 2003-06-05 18:00:24 +0000 |
|---|---|---|
| committer | Dave Love | 2003-06-05 18:00:24 +0000 |
| commit | d0982fbddb5d9202766a24ace3313b281a0a2eff (patch) | |
| tree | e1b13c9ff11ae2359d1b1dd0ca33a9b9be197fd8 /gc/gc_cpp.cc | |
| parent | 460ff54e9d7a1aca9043ac267025e17b7b299595 (diff) | |
| download | emacs-d0982fbddb5d9202766a24ace3313b281a0a2eff.tar.gz emacs-d0982fbddb5d9202766a24ace3313b281a0a2eff.zip | |
Not committed to branch, sorry.
Diffstat (limited to 'gc/gc_cpp.cc')
| -rw-r--r-- | gc/gc_cpp.cc | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/gc/gc_cpp.cc b/gc/gc_cpp.cc deleted file mode 100644 index f8b803a8baa..00000000000 --- a/gc/gc_cpp.cc +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | /************************************************************************* | ||
| 2 | Copyright (c) 1994 by Xerox Corporation. All rights reserved. | ||
| 3 | |||
| 4 | THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED | ||
| 5 | OR IMPLIED. ANY USE IS AT YOUR OWN RISK. | ||
| 6 | |||
| 7 | Last modified on Sat Nov 19 19:31:14 PST 1994 by ellis | ||
| 8 | on Sat Jun 8 15:10:00 PST 1994 by boehm | ||
| 9 | |||
| 10 | Permission is hereby granted to copy this code for any purpose, | ||
| 11 | provided the above notices are retained on all copies. | ||
| 12 | |||
| 13 | This implementation module for gc_c++.h provides an implementation of | ||
| 14 | the global operators "new" and "delete" that calls the Boehm | ||
| 15 | allocator. All objects allocated by this implementation will be | ||
| 16 | non-collectable but part of the root set of the collector. | ||
| 17 | |||
| 18 | You should ensure (using implementation-dependent techniques) that the | ||
| 19 | linker finds this module before the library that defines the default | ||
| 20 | built-in "new" and "delete". | ||
| 21 | |||
| 22 | Authors: John R. Ellis and Jesse Hull | ||
| 23 | |||
| 24 | **************************************************************************/ | ||
| 25 | /* Boehm, December 20, 1994 7:26 pm PST */ | ||
| 26 | |||
| 27 | #include "gc_cpp.h" | ||
| 28 | |||
| 29 | void* operator new( size_t size ) { | ||
| 30 | return GC_MALLOC_UNCOLLECTABLE( size );} | ||
| 31 | |||
| 32 | void operator delete( void* obj ) { | ||
| 33 | GC_FREE( obj );} | ||
| 34 | |||
| 35 | #ifdef GC_OPERATOR_NEW_ARRAY | ||
| 36 | |||
| 37 | void* operator new[]( size_t size ) { | ||
| 38 | return GC_MALLOC_UNCOLLECTABLE( size );} | ||
| 39 | |||
| 40 | void operator delete[]( void* obj ) { | ||
| 41 | GC_FREE( obj );} | ||
| 42 | |||
| 43 | #endif /* GC_OPERATOR_NEW_ARRAY */ | ||
| 44 | |||
| 45 | #ifdef _MSC_VER | ||
| 46 | |||
| 47 | // This new operator is used by VC++ in case of Debug builds ! | ||
| 48 | void* operator new( size_t size, | ||
| 49 | int ,//nBlockUse, | ||
| 50 | const char * szFileName, | ||
| 51 | int nLine ) | ||
| 52 | { | ||
| 53 | #ifndef GC_DEBUG | ||
| 54 | return GC_malloc_uncollectable( size ); | ||
| 55 | #else | ||
| 56 | return GC_debug_malloc_uncollectable(size, szFileName, nLine); | ||
| 57 | #endif | ||
| 58 | } | ||
| 59 | |||
| 60 | #endif /* _MSC_VER */ | ||
| 61 | |||