Back to index

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