Split out platform specific defines to common header file
svn: r12251
This commit is contained in:
parent
77df801ad1
commit
a4b99783d7
|
@ -31,6 +31,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "platforms.h"
|
||||||
#include "gc2.h"
|
#include "gc2.h"
|
||||||
#include "gc2_dump.h"
|
#include "gc2_dump.h"
|
||||||
#include "newgc_internal.h"
|
#include "newgc_internal.h"
|
||||||
|
@ -38,30 +39,6 @@
|
||||||
|
|
||||||
static THREAD_LOCAL NewGC *GC;
|
static THREAD_LOCAL NewGC *GC;
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
# include <windows.h>
|
|
||||||
# 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"
|
#include "msgprint.c"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
23
src/mzscheme/gc2/platforms.h
Normal file
23
src/mzscheme/gc2/platforms.h
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#ifdef _WIN32
|
||||||
|
# include <windows.h>
|
||||||
|
# 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
|
Loading…
Reference in New Issue
Block a user