00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00020 
00021 #ifndef _CONFIG_H_
00022 #define _CONFIG_H_
00023 
00024 #ifndef _REENTRANT
00025 #define _REENTRANT              // If defined, generate a multithreaded-capable version.
00026 #endif
00027 
00028 #ifndef USER_LOCKS
00029 #if !(defined(sparc) || defined(i386) || defined(__sgi) || defined(ppc))
00030 #define USER_LOCKS 0
00031 #else
00032 #define USER_LOCKS 1            // Use our own user-level locks if they're available for the current architecture.
00033 #endif
00034 #endif
00035 
00036 #define HEAP_LOG 0              // If non-zero, keep a log of heap accesses.
00037 
00038 
00040 
00041 #if defined(WIN32)
00042 
00043 #define _CRTIMP __declspec(dllimport)
00044 
00045 #if 0
00046 #ifndef __PLACEMENT_NEW_INLINE
00047 #define __PLACEMENT_NEW_INLINE
00048 inline void *__cdecl operator new(size_t, void *_P) { return (_P); }
00049 #if _MSC_VER >= 1200
00050 inline void __cdecl operator delete(void *, void *) { return; }
00051 #endif
00052 #endif
00053 #endif
00054 
00055 #endif
00056 
00057 
00058 
00059 
00060 
00061 enum { SUPERBLOCK_FULLNESS_GROUP = 9 };
00062 
00063 
00064 
00065 enum { SUPERBLOCK_SIZE = 16384 };
00066 
00067 
00068 
00069 
00070 
00071 #define HEAP_DEBUG 0            // If non-zero, keeps extra info for sanity checking.
00072 #define HEAP_STATS 0            // If non-zero, maintain blowup statistics.
00073 #define HEAP_FRAG_STATS 0       // If non-zero, maintain fragmentation statistics.
00074 
00075 
00076 
00077 
00078 #if defined(i386) || defined(WIN32)
00079 #define CACHE_LINE 32
00080 #endif
00081 
00082 #ifdef sparc
00083 #define CACHE_LINE 64
00084 #endif
00085 
00086 #ifdef __sgi
00087 #define CACHE_LINE 128
00088 #endif
00089 
00090 #ifndef CACHE_LINE
00091 
00092 
00093 #define CACHE_LINE 64
00094 #endif
00095 
00096 #ifdef __GNUG__
00097 
00098 #define MAX(a,b) ((a) >? (b))
00099 #else
00100 #define MAX(a,b) (((a) > (b)) ? (a) : (b))
00101 #endif
00102 
00103 
00104 #endif // _CONFIG_H_
00105