Back to index

plt-scheme  4.2.1
MacOS_config.h
Go to the documentation of this file.
00001 /*
00002        MacOS_config.h
00003        
00004        Configuration flags for Macintosh development systems.
00005        
00006        <Revision History>
00007        
00008        11/16/95  pcb  Updated compilation flags to reflect latest 4.6 Makefile.
00009        
00010        by Patrick C. Beard.
00011  */
00012 /* Boehm, November 17, 1995 12:10 pm PST */
00013 
00014 #ifdef __MWERKS__
00015 
00016 // for CodeWarrior Pro with Metrowerks Standard Library (MSL).
00017 // #define MSL_USE_PRECOMPILED_HEADERS 0
00018 #include <ansi_prefix.mac.h>
00019 #ifndef __STDC__
00020 #define __STDC__ 0
00021 #endif
00022 
00023 #endif /* __MWERKS__ */
00024 
00025 // these are defined again in gc_priv.h.
00026 #undef TRUE
00027 #undef FALSE
00028 
00029 #define ALL_INTERIOR_POINTERS      // follows interior pointers.
00030 #define SILENT                     // no collection messages.
00031 //#define DONT_ADD_BYTE_AT_END     // no padding.
00032 //#define SMALL_CONFIG             // whether to use a smaller heap.
00033 #define NO_SIGNALS          // signals aren't real on the Macintosh.
00034 #define USE_TEMPORARY_MEMORY       // use Macintosh temporary memory.
00035 
00036 // CFLAGS= -O -DNO_SIGNALS -DSILENT -DALL_INTERIOR_POINTERS
00037 //
00038 //LIBGC_CFLAGS= -O -DNO_SIGNALS -DSILENT \
00039 //    -DREDIRECT_MALLOC=GC_malloc_uncollectable \
00040 //    -DDONT_ADD_BYTE_AT_END -DALL_INTERIOR_POINTERS
00041 //   Flags for building libgc.a -- the last two are required.
00042 //
00043 // Setjmp_test may yield overly optimistic results when compiled
00044 // without optimization.
00045 // -DSILENT disables statistics printing, and improves performance.
00046 // -DCHECKSUMS reports on erroneously clear dirty bits, and unexpectedly
00047 //   altered stubborn objects, at substantial performance cost.
00048 //   Use only for incremental collector debugging.
00049 // -DFIND_LEAK causes the collector to assume that all inaccessible
00050 //   objects should have been explicitly deallocated, and reports exceptions.
00051 //   Finalization and the test program are not usable in this mode.
00052 // -DSOLARIS_THREADS enables support for Solaris (thr_) threads.
00053 //   (Clients should also define SOLARIS_THREADS and then include
00054 //   gc.h before performing thr_ or GC_ operations.)
00055 //   This is broken on nonSPARC machines.
00056 // -DALL_INTERIOR_POINTERS allows all pointers to the interior
00057 //   of objects to be recognized.  (See gc_priv.h for consequences.)
00058 // -DSMALL_CONFIG tries to tune the collector for small heap sizes,
00059 //   usually causing it to use less space in such situations.
00060 //   Incremental collection no longer works in this case.
00061 // -DLARGE_CONFIG tunes the collector for unusually large heaps.
00062 //   Necessary for heaps larger than about 500 MB on most machines.
00063 //   Recommended for heaps larger than about 64 MB.
00064 // -DDONT_ADD_BYTE_AT_END is meaningful only with
00065 //   -DALL_INTERIOR_POINTERS.  Normally -DALL_INTERIOR_POINTERS
00066 //   causes all objects to be padded so that pointers just past the end of
00067 //   an object can be recognized.  This can be expensive.  (The padding
00068 //   is normally more than one byte due to alignment constraints.)
00069 //   -DDONT_ADD_BYTE_AT_END disables the padding.
00070 // -DNO_SIGNALS does not disable signals during critical parts of
00071 //   the GC process.  This is no less correct than many malloc 
00072 //   implementations, and it sometimes has a significant performance
00073 //   impact.  However, it is dangerous for many not-quite-ANSI C
00074 //   programs that call things like printf in asynchronous signal handlers.
00075 // -DGC_OPERATOR_NEW_ARRAY declares that the C++ compiler supports the
00076 //   new syntax "operator new[]" for allocating and deleting arrays.
00077 //   See gc_cpp.h for details.  No effect on the C part of the collector.
00078 //   This is defined implicitly in a few environments.
00079 // -DREDIRECT_MALLOC=X causes malloc, realloc, and free to be defined
00080 //   as aliases for X, GC_realloc, and GC_free, respectively.
00081 //   Calloc is redefined in terms of the new malloc.  X should
00082 //   be either GC_malloc or GC_malloc_uncollectable.
00083 //   The former is occasionally useful for working around leaks in code
00084 //   you don't want to (or can't) look at.  It may not work for
00085 //   existing code, but it often does.  Neither works on all platforms,
00086 //   since some ports use malloc or calloc to obtain system memory.
00087 //   (Probably works for UNIX, and win32.)
00088 // -DNO_DEBUG removes GC_dump and the debugging routines it calls.
00089 //   Reduces code size slightly at the expense of debuggability.