1 | /* -*-c++-*- */ |
---|
2 | /******************************************************************* |
---|
3 | * File: omConfig.h.in |
---|
4 | * Purpose: configuration for omalloc |
---|
5 | * Author: obachman (Olaf Bachmann) |
---|
6 | * Created: 11/99 |
---|
7 | * Version: $Id$ |
---|
8 | *******************************************************************/ |
---|
9 | #ifndef OM_CONFIG_H |
---|
10 | #define OM_CONFIG_H |
---|
11 | |
---|
12 | /******************************************************************* |
---|
13 | * Defines which are set by configure |
---|
14 | ******************************************************************/ |
---|
15 | /* define if you provide an external config file to be included |
---|
16 | by omDefaultConfig.h */ |
---|
17 | #ifndef OM_HAVE_EXTERNAL_CONFIG_H |
---|
18 | #undef OM_HAVE_EXTERNAL_CONFIG_H |
---|
19 | #endif |
---|
20 | /* define if you can inline */ |
---|
21 | #ifndef OM_INLINE |
---|
22 | #undef OM_INLINE |
---|
23 | #endif |
---|
24 | /* define for inline decl in headers */ |
---|
25 | #ifndef OM_INLINE_DECL |
---|
26 | #define OM_INLINE_DECL extern |
---|
27 | #endif |
---|
28 | /* define for inline implementation in Include*/ |
---|
29 | #ifndef OM_INLINE_IMPL |
---|
30 | #undef OM_INLINE_IMPL |
---|
31 | #endif |
---|
32 | /* define for local inline */ |
---|
33 | #ifndef OM_INLINE_LOCAL |
---|
34 | #define OM_INLINE_LOCAL static |
---|
35 | #endif |
---|
36 | /* defint to nothing if you do not understand const */ |
---|
37 | #ifndef const |
---|
38 | #undef const |
---|
39 | #endif |
---|
40 | /* define to the name of addr2line program, undef otherwise */ |
---|
41 | #ifndef OM_PROG_ADDR2LINE |
---|
42 | #undef OM_PROG_ADDR2LINE |
---|
43 | #endif |
---|
44 | /* define to the name of nm program, undef otherwise */ |
---|
45 | #ifndef OM_PROG_NM |
---|
46 | #undef OM_PROG_NM |
---|
47 | #endif |
---|
48 | /* define if you have popen */ |
---|
49 | #ifndef HAVE_POPEN |
---|
50 | #undef HAVE_POPEN |
---|
51 | #endif |
---|
52 | /* define if you have readlink */ |
---|
53 | #ifndef HAVE_READLINK |
---|
54 | #undef HAVE_READLINK |
---|
55 | #endif |
---|
56 | /* define if you have sbrk */ |
---|
57 | #ifndef HAVE_SBRK |
---|
58 | #undef HAVE_SBRK |
---|
59 | #endif |
---|
60 | /* define if you have getcwd */ |
---|
61 | #ifndef HAVE_GETCWD |
---|
62 | #undef HAVE_GETCWD |
---|
63 | #endif |
---|
64 | /* define if you have getwd */ |
---|
65 | #ifndef HAVE_GETWD |
---|
66 | #undef HAVE_GETWD |
---|
67 | #endif |
---|
68 | /* define if you have a working mmap */ |
---|
69 | #ifndef HAVE_WORKING_MMAP |
---|
70 | #undef HAVE_WORKING_MMAP |
---|
71 | #endif |
---|
72 | /* define if you have STDC_HEADERS */ |
---|
73 | #ifndef STDC_HEADERS |
---|
74 | #undef STDC_HEADERS |
---|
75 | #endif |
---|
76 | /* define if you have unistd.h */ |
---|
77 | #ifndef HAVE_UNISTD_H |
---|
78 | #undef HAVE_UNISTD_H |
---|
79 | #endif |
---|
80 | /* define if you have fcntl.h */ |
---|
81 | #ifndef HAVE_FCNTL_H |
---|
82 | #define HAVE_FCNTL_H |
---|
83 | #endif |
---|
84 | /* define if you have sys/mman.h */ |
---|
85 | #ifndef HAVE_SYS_MMAN_H |
---|
86 | #define HAVE_SYS_MMAN_H |
---|
87 | #endif |
---|
88 | /* define if GET_RETURN_ADDR works */ |
---|
89 | #ifndef OM_GET_RETURN_ADDR_WORK |
---|
90 | #undef OM_GET_RETURN_ADDR_WORKS |
---|
91 | #endif |
---|
92 | /* define if GET_RETURN_ADDR works */ |
---|
93 | #ifndef OM_GET_BACKTRACE_WORK |
---|
94 | #undef OM_GET_BACKTRACE_WORKS |
---|
95 | #endif |
---|
96 | /* Define sizeof(long) */ |
---|
97 | #ifndef SIZEOF_LONG |
---|
98 | #define SIZEOF_LONG 4 |
---|
99 | #endif |
---|
100 | /* Define sizeof(double) */ |
---|
101 | #ifndef SIZEOF_DOUBLE |
---|
102 | #define SIZEOF_DOUBLE 4 |
---|
103 | #endif |
---|
104 | /* Define sizeof(size_t) */ |
---|
105 | #ifndef SIZEOF_SIZE_T |
---|
106 | #define SIZEOF_SIZE_T 4 |
---|
107 | #endif |
---|
108 | #ifndef SIZEOF_SYSTEM_PAGE |
---|
109 | /* Define pagesize of your system */ |
---|
110 | #define SIZEOF_SYSTEM_PAGE 4096 |
---|
111 | #endif |
---|
112 | #ifndef SIZEOF_OM_PAGE |
---|
113 | /* size of page as we can use it */ |
---|
114 | #define SIZEOF_OM_PAGE SIZEOF_SYSTEM_PAGE |
---|
115 | #endif |
---|
116 | /* define if you want to use mmap for valloc */ |
---|
117 | #ifndef OM_HAVE_VALLOC_MMAP |
---|
118 | #undef OM_HAVE_VALLOC_MMAP |
---|
119 | #endif |
---|
120 | /* define if you want to use malloc-provided valloc */ |
---|
121 | #ifndef HAVE_VALLOC_MALLOC |
---|
122 | #undef OM_HAVE_VALLOC_MALLOC |
---|
123 | #endif |
---|
124 | #ifndef OM_MALLOC_PROVIDES_SIZEOF_ADDR |
---|
125 | /* define if your malloc provides a working OM_MALLOC_SIZEOF_ADDR */ |
---|
126 | #undef OM_MALLOC_PROVIDES_SIZEOF_ADDR |
---|
127 | #endif |
---|
128 | #ifndef OM_EMULATE_OMALLOC |
---|
129 | /* define if you only want to emulate omalloc, but not actually use it */ |
---|
130 | #undef OM_EMULATE_OMALLOC |
---|
131 | #endif |
---|
132 | #ifndef OM_ALIGN_8 |
---|
133 | /* define if you want your memory to be 8-aligned */ |
---|
134 | #undef OM_ALIGN_8 |
---|
135 | #endif |
---|
136 | #ifndef OM_ALIGNMENT_NEEDS_WORK |
---|
137 | /* define if you insist on AllocAligned returnes 8-aligned */ |
---|
138 | #undef OM_ALIGNMENT_NEEDS_WORK |
---|
139 | #endif |
---|
140 | /* define if you want to have a dense distribution of bins */ |
---|
141 | #ifndef OM_HAVE_DENSE_BIN_DISTRIBUTION |
---|
142 | #undef OM_HAVE_DENSE_BIN_DISTRIBUTION |
---|
143 | #endif |
---|
144 | /* define to disable all debugging stuff */ |
---|
145 | #ifndef OM_NDEBUG |
---|
146 | #undef OM_NDEBUG |
---|
147 | #endif |
---|
148 | /* define to enable debug tracking */ |
---|
149 | #ifndef OM_HAVE_TRACK |
---|
150 | #undef OM_HAVE_TRACK |
---|
151 | #endif |
---|
152 | /* define to enable tracking of files/line numbers */ |
---|
153 | #ifndef OM_TRACK_FILE_LINE |
---|
154 | #undef OM_TRACK_FILE_LINE |
---|
155 | #endif |
---|
156 | /* define to enable tracking of return addresses */ |
---|
157 | #ifndef OM_TRACK_RETURN |
---|
158 | #undef OM_TRACK_RETURN |
---|
159 | #endif |
---|
160 | /* define to enable tracking of stack backtraces */ |
---|
161 | #ifndef OM_TRACK_BACKTRACE |
---|
162 | #undef OM_TRACK_BACKTRACE |
---|
163 | #endif |
---|
164 | /* define to enable tracking of custom value */ |
---|
165 | #ifndef OM_TRACK_CUSTOM |
---|
166 | #undef OM_TRACK_CUSTOM |
---|
167 | #endif |
---|
168 | /* define to enable internal debugging */ |
---|
169 | #ifndef OM_INTERNAL_DEBUG |
---|
170 | #undef OM_INTERNAL_DEBUG |
---|
171 | #endif |
---|
172 | /* define to -1/0/1/2/3 if you want omalloc to provide |
---|
173 | "underlying malloc"/no/normal/debug ANSI-C conforming |
---|
174 | malloc/calloc/realloc/free funcs */ |
---|
175 | #ifndef OM_PROVIDE_MALLOC |
---|
176 | #define OM_PROVIDE_MALLOC 0 |
---|
177 | #endif |
---|
178 | #endif /* OM_CONFIG_H */ |
---|
179 | /* define if omalloc depends on "external" malloc functions like |
---|
180 | those provided by the system -- if this id defined, an application |
---|
181 | linking with omalloc needs to assure that a library containing malloc |
---|
182 | is linked, as well */ |
---|
183 | #ifndef OMALLOC_USES_MALLOC |
---|
184 | #undef OMALLOC_USES_MALLOC |
---|
185 | #endif |
---|