source: git/omalloc/omConfig.h.in @ 212fc04

spielwiese
Last change on this file since 212fc04 was 212fc04, checked in by Olaf Bachmann <obachman@…>, 24 years ago
* as we go along git-svn-id: file:///usr/local/Singular/svn/trunk@3878 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.2 KB
Line 
1/*******************************************************************
2 *  File:    omConfig.h.in
3 *  Purpose: configuration for omalloc 
4 *  Author:  obachman (Olaf Bachmann)
5 *  Created: 11/99
6 *  Version: $Id: omConfig.h.in,v 1.2 1999-11-22 18:12:58 obachman Exp $
7 *******************************************************************/
8#ifndef OM_CONFIG_H
9#define OM_CONFIG_H
10
11/*******************************************************************
12 * Defines which are set by configure
13 ******************************************************************/
14/* define if you can inline */
15#undef OM_INLINE
16/* define to the name of addr2line program, undef otherwise */
17#ifndef OM_PROG_ADDR2LINE
18#undef OM_PROG_ADDR2LINE
19#endif
20/* define to the name of nm program, undef otherwise */
21#ifndef OM_PROG_NM
22#undef OM_PROG_NM
23#endif
24/* define if you have popen */
25#ifndef HAVE_POPEN
26#undef HAVE_POPEN
27#endif
28/* define if you have readlink */
29#ifndef HAVE_READLINK
30#undef HAVE_READLINK
31#endif
32/* define if you have getcwd */
33#ifndef HAVE_GETCWD
34#undef HAVE_GETCWD
35#endif
36/* define if you have getwd */
37#ifndef HAVE_GETWD
38#undef HAVE_GETWD
39#endif
40/* define if you have STDC_HEADERS */
41#ifndef STDC_HEADERS
42#undef STDC_HEADERS
43#endif
44/* define if you have unistd.h */
45#ifndef HAVE_UNISTD_H
46#undef HAVE_UNISTD_H
47#endif
48/* define to func which returns ith return addr */
49#ifndef OM_RETURN_ADDR
50#undef OM_RETURN_ADDR
51#endif
52/* define to func which returns ith frame addr */
53#ifndef OM_FRAME_ADDR
54#undef OM_FRAME_ADDR
55#endif
56/* define if OM_RETURN_ADDR actually works */
57#ifndef OM_RETURN_ADDR_WORKS
58#undef OM_RETURN_ADDR_WORKS
59#endif
60/* define if OM_FRAME_ADDR actually works */
61#ifndef OM_FRAME_ADDR_WORKS
62#undef OM_FRAME_ADDR_WORKS
63#endif
64/* define if OM_RETURN_ADDR actually rvalue */
65#ifndef OM_RETURN_ADDR_RVALUE
66#undef OM_RETURN_ADDR_RVALUE
67#endif
68/* define if OM_FRAME_ADDR actually rvalue */
69#ifndef OM_FRAME_ADDR_RVALUE
70#undef OM_FRAME_ADDR_RVALUE
71#endif
72/* Define sizeof(long) */
73#ifndef SIZEOF_LONG
74#define SIZEOF_LONG 4
75#endif
76#ifndef SIZEOF_SYSTEM_PAGE
77/* Define pagesize of your system */
78#define SIZEOF_SYSTEM_PAGE 4096
79#endif
80#ifndef SIZEOF_OM_PAGE
81/* size of page as we can use it */
82#define SIZEOF_OM_PAGE SIZEOF_SYSTEM_PAGE
83#endif
84#ifndef OM_ALIGN_8
85/* define if you want your memory to be 8-aligned */
86#undef OM_ALIGN_8
87#endif
88/* define if you want enable memory statistics */
89#undef OM_HAVE_STAT
90#ifndef HAVE_GMALLOC
91/* Define if our gmalloc is to be used */
92#undef HAVE_GMALLOC
93#endif
94#ifndef PROVIDE_MALLOC
95/* define you you want omalloc to provide malloc, free, realloc */
96#undef PROVIDE_MALLOC
97#endif
98
99/* define what to do on total out of memory */
100#ifndef OM_OUT_OF_MEMORY
101#define OM_OUT_OF_MEMORY() \
102   fprintf(stderr, "***Emergency Exit: Out of Memory\n"); exit(1);
103#endif
104
105/* define hook which is called when running out of memory */
106#ifndef OM_OUT_OF_MEMORY_HOOK
107#define OM_OUT_OF_MEMORY_HOOK()
108#endif
109
110/* define this if you want to monitor memory usage */
111#ifndef OM_CHECK_PRINT
112#define OM_CHECK_PRINT(bytesMalloc, bytesValloc)
113#endif
114
115/* define low-level malloc/free routines */
116#ifndef OM_MALLOC
117#define OM_MALLOC(size) malloc(size)
118#endif
119#ifndef OM_REALLOC
120#define OM_REALLOC(addr, newsize) realloc(addr, newsize)
121#endif
122#ifndef OM_FREE
123#define OM_FREE(addr)   free(addr)
124#endif
125#ifndef OM_VALLOC
126#define OM_VALLOC(size) valloc(size)
127#endif
128#ifndef OM_VFREE
129#define OM_VFREE(addr)  free(addr)
130#endif
131
132
133
134/*******************************************************************
135 * Defines which are not set by configure
136 ******************************************************************/
137#ifndef SIZEOF_VOIDP
138/* configure makes sure that SIZEOF_VOIDP == SIZEOF_LONG */
139#define SIZEOF_VOIDP SIZEOF_LONG
140#endif
141
142#if SIZEOF_VOIDP == 8
143#define LOG_SIZEOF_LONG  3
144#define LOG_SIZEOF_VOIDP 3
145#else
146#define LOG_SIZEOF_LONG  2
147#define LOG_SIZEOF_VOIDP 2
148#endif
149
150#ifndef CHAR_BIT
151#define CHAR_BIT 8
152#endif
153
154#define BIT_SIZEOF_LONG CHAR_BIT*SIZEOF_LONG
155
156/* define to enable assume */
157#ifndef HAVE_OM_ASSUME
158#ifndef NDEBUG
159#define HAVE_OM_ASSUME
160#endif
161#endif
162
163/* set to 0 to disable aso memory mamagent */
164#ifndef HAVE_ASO
165#define HAVE_ASO 1
166#endif
167#if defined(HAVE_ASO) && HAVE_ASO == 1
168/* define to enable ASO debugging */
169#undef ASO_DEBUG
170#endif
171
172#ifndef NULL
173#define NULL ((void*)0)
174#endif
175
176#endif /* OM_CONFIG_H  */
Note: See TracBrowser for help on using the repository browser.