diff --git a/src/mzscheme/gc2/newgc.c b/src/mzscheme/gc2/newgc.c index 91e2ae8c36..742fffb4f9 100644 --- a/src/mzscheme/gc2/newgc.c +++ b/src/mzscheme/gc2/newgc.c @@ -31,6 +31,7 @@ #include #include #include +#include "platforms.h" #include "gc2.h" #include "gc2_dump.h" #include "newgc_internal.h" @@ -38,30 +39,6 @@ static THREAD_LOCAL NewGC *GC; -#ifdef _WIN32 -# include -# define bzero(m, s) memset(m, 0, s) -# define inline _inline -#endif - -#if defined(sparc) || defined(__sparc) || defined(__sparc__) -/* Required for `double' operations: */ -# define GC_ALIGN_EIGHT -#endif - -/* Even when 8-byte alginment is not required by the processor, it's - better for floating-point performance (PowerPC) and may be required - for some libraries (VecLib in Mac OS X, including x86). - - Under Windows, Mac OS X, and Linux x86_64, malloc() returns 16-byte - aligned data. And, actually, VecLib says that it requires - 16-byte-aligned data. So, in those cases, GC_ALIGN_SIXTEEN might be - better --- but that's a lot more expensive, increasing DrScheme's - initial footprint by almost 10%. */ -#ifndef GC_ALIGN_EIGHT -# define GC_ALIGN_EIGHT -#endif - #include "msgprint.c" /*****************************************************************************/ diff --git a/src/mzscheme/gc2/platforms.h b/src/mzscheme/gc2/platforms.h new file mode 100644 index 0000000000..23d04884a2 --- /dev/null +++ b/src/mzscheme/gc2/platforms.h @@ -0,0 +1,23 @@ +#ifdef _WIN32 +# include +# define bzero(m, s) memset(m, 0, s) +# define inline _inline +#endif + +#if defined(sparc) || defined(__sparc) || defined(__sparc__) +/* Required for `double' operations: */ +# define GC_ALIGN_EIGHT +#endif + +/* Even when 8-byte alginment is not required by the processor, it's + better for floating-point performance (PowerPC) and may be required + for some libraries (VecLib in Mac OS X, including x86). + + Under Windows, Mac OS X, and Linux x86_64, malloc() returns 16-byte + aligned data. And, actually, VecLib says that it requires + 16-byte-aligned data. So, in those cases, GC_ALIGN_SIXTEEN might be + better --- but that's a lot more expensive, increasing DrScheme's + initial footprint by almost 10%. */ +#ifndef GC_ALIGN_EIGHT +# define GC_ALIGN_EIGHT +#endif