source: git/omalloc/omAllocDecl.h @ 6acb5a5

spielwiese
Last change on this file since 6acb5a5 was 6acb5a5, checked in by Olaf Bachmann <obachman@…>, 24 years ago
HP bug fixes git-svn-id: file:///usr/local/Singular/svn/trunk@4534 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 20.6 KB
Line 
1/*******************************************************************
2 *  File:    omAllocDecl.h
3 *  Purpose: declaration of Alloc routines
4 *  Author:  obachman (Olaf Bachmann)
5 *  Created: 11/99
6 *  Version: $Id: omAllocDecl.h,v 1.4 2000-08-16 12:55:46 obachman Exp $
7 *******************************************************************/
8#ifndef OM_ALLOC_DECL_H
9#define OM_ALLOC_DECL_H
10
11
12#if !defined(OMALLOC_C) && !defined(OM_NO_MALLOC_MACROS)
13#define calloc      omcalloc
14#define malloc      omalloc
15#define free        omfree
16#define realloc     omrealloc
17#define freeSize    omfreeSize
18#define reallocSize omreallocSize
19#endif
20
21#if !defined(OM_EMULATE_OMALLOC) && !defined(OM_NDEBUG) && (defined(OM_CHECK) || (defined(OM_HAVE_TRACK) && defined(OM_TRACK)))
22
23/*******************************************************************
24 *
25 * Alloc/Free/Check for Debug
26 *
27 *******************************************************************/
28#ifndef OM_CHECK
29#define OM_CHECK    0
30#endif
31#ifndef OM_TRACK
32#define OM_TRACK    0
33#endif
34
35#define omTypeAllocBin(type,addr,bin)           addr=(type)_omDebugAlloc(bin,OM_FBIN,OM_CTFL)
36#define omTypeAlloc0Bin(type,addr,bin)          addr=(type)_omDebugAlloc(bin,OM_FBIN|OM_FZERO,OM_CTFL)
37#define omAllocBin(bin)                         _omDebugAlloc(bin,OM_FBIN,OM_CTFL)
38#define omAlloc0Bin(bin)                        _omDebugAlloc(bin,OM_FBIN|OM_FZERO,OM_CTFL)
39
40#define omTypeAlloc(type,addr,size)             addr=(type)_omDebugAlloc((void*)(size),OM_FSIZE,OM_CTFL)
41#define omTypeAlloc0(type,addr,size)            addr=(type)_omDebugAlloc((void*)(size),OM_FSIZE|OM_FZERO,OM_CTFL)
42#define omAlloc(size)                           _omDebugAlloc((void*)(size),OM_FSIZE,OM_CTFL)
43#define omAlloc0(size)                          _omDebugAlloc((void*)(size),OM_FSIZE|OM_FZERO,OM_CTFL)
44
45#define omTypeReallocBin(o_addr,o_bin,type,addr,bin)            addr=(type)_omDebugRealloc(o_addr,o_bin,bin,OM_FBIN,OM_FBIN,OM_CTFL)
46#define omTypeRealloc0Bin(o_addr,o_bin,type,addr,bin)           addr=(type)_omDebugRealloc(o_addr,o_bin,bin,OM_FBIN,OM_FBIN|OM_FZERO,OM_CTFL)
47#define omReallocBin(o_addr,o_bin,bin)                          _omDebugRealloc(o_addr,o_bin,bin,OM_FBIN,OM_FBIN,OM_CTFL)
48#define omRealloc0Bin(o_addr,o_bin,bin)                         _omDebugRealloc(o_addr,o_bin,bin,OM_FBIN,OM_FBIN|OM_FZERO,OM_CTFL)
49
50#define omTypeReallocSize(o_addr,o_size,type,addr,size)         addr=(type)_omDebugRealloc(o_addr,(void*)(o_size),(void*)(size),OM_FSIZE,OM_FSIZE,OM_CTFL)
51#define omTypeRealloc0Size(o_addr,o_size,type,addr,size)        addr=(type)_omDebugRealloc(o_addr,(void*)(o_size),(void*)(size),OM_FSIZE,OM_FSIZE|OM_FZERO,OM_CTFL)
52#define omReallocSize(addr,o_size,size)                         _omDebugRealloc(addr,(void*)(o_size),(void*)(size),OM_FSIZE,OM_FSIZE,OM_CTFL)
53#define omRealloc0Size(addr,o_size,size)                        _omDebugRealloc(addr,(void*)(o_size),(void*)(size),OM_FSIZE,OM_FSIZE|OM_FZERO,OM_CTFL)
54
55#define omTypeRealloc(o_addr,type,addr,size)                    addr=(type)_omDebugRealloc(o_addr,NULL,(void*)(size),0,OM_FSIZE,OM_CTFL)
56#define omTypeRealloc0(o_addr,type,addr,size)                   addr=(type)_omDebugRealloc(o_addr,NULL,(void*)(size),0,OM_FSIZE|OM_FZERO,OM_CTFL)
57#define omRealloc(addr,size)                                    _omDebugRealloc(addr,NULL,(void*)(size),0,OM_FSIZE,OM_CTFL)
58#define omRealloc0(addr,size)                                   _omDebugRealloc(addr,NULL,(void*)(size),0,OM_FSIZE|OM_FZERO,OM_CTFL)
59
60#define omFreeBin(addr,bin)     _omDebugFree(addr,bin,OM_FBIN,OM_CFL)
61#define omFreeSize(addr,size)   _omDebugFree(addr,(void*)(size),OM_FSIZE,OM_CFL)
62#define omFree(addr)            _omDebugFree(addr,0,0,OM_CFL)
63
64
65#define omalloc(size)   _omDebugAlloc((void*)(size),OM_FSIZE|OM_FSLOPPY|OM_FALIGN,OM_CTFL)
66#define omalloc0(size)  _omDebugAlloc((void*)(size),OM_FSIZE|OM_FZERO|OM_FSLOPPY|OM_FALIGN,OM_CTFL)
67#define omcalloc(n,size)_omDebugAlloc((void*) ((size)*n),OM_FSIZE|OM_FZERO|OM_FSLOPPY|OM_FALIGN,OM_CTFL)
68
69#define omreallocSize(addr,o_size,size) _omDebugRealloc(addr,(void*)(o_size),(void*)(size),OM_FSIZE|OM_FSLOPPY,OM_FSIZE|OM_FSLOPPY|OM_FALIGN,OM_CTFL)
70#define omrealloc0Size(addr,o_size,size)_omDebugRealloc(addr,(void*)(o_size),(void*)(size),OM_FSIZE|OM_FSLOPPY,OM_FSIZE|OM_FZERO|OM_FSLOPPY|OM_FALIGN,OM_CTFL)
71#define omrealloc(addr,size)            _omDebugRealloc(addr,NULL,(void*)(size),OM_FSLOPPY,OM_FSIZE|OM_FSLOPPY|OM_FALIGN,OM_CTFL)
72#define omrealloc0(addr,size)           _omDebugRealloc(addr,NULL,(void*)(size),OM_FSLOPPY,OM_FSIZE|OM_FZERO|OM_FSLOPPY|OM_FALIGN,OM_CTFL)
73
74#define omfreeSize(addr,size)   _omDebugFree(addr,(void*)(size),OM_FSIZE|OM_FSLOPPY,OM_CFL)
75#define omfree(addr)            _omDebugFree(addr,NULL,OM_FSLOPPY,OM_CFL)
76
77#define omStrDup(s)                             _omDebugStrDup(s,OM_TFL)
78#define omMemDup(addr)                          _omDebugMemDup(addr,0,OM_CTFL)
79
80
81#define omDebugAddrBin(addr, bin)            _omDebugAddr(addr,bin,OM_FBIN,OM_CFL)
82#define omDebugAddrSize(addr,size)           _omDebugAddr(addr,(void*)(size),OM_FSIZE,OM_CFL)
83#define omDebugAddr(addr)                    _omDebugAddr(addr,NULL, 0, OM_CFL)
84#define omdebugAddrSize(addr,size)           _omDebugAddr(addr,(void*)(size),OM_FSIZE|OM_FSLOPPY,OM_CFL)
85#define omdebugAddr(addr)                    _omDebugAddr(addr,NULL, OM_FSLOPPY, OM_CFL)
86#define omDebugBin(bin)                      _omDebugBin(bin,OM_CFL)
87#define omDebugMemory()                      _omDebugMemory(OM_CFL)
88#define omDebugIf(cond, statement)           do { if (cond) {statement;}} while (0)
89
90#if OM_CHECK > 0
91#define omCheckAddrBin      omDebugAddrBin   
92#define omCheckAddrSize     omDebugAddrSize 
93#define omCheckAddr         omDebugAddr     
94#define omcheckAddrSize     omdebugAddrSize 
95#define omcheckAddr         omdebugAddr     
96#define omCheckBin          omDebugBin       
97#define omCheckMemory       omDebugMemory   
98#define omCheckIf           omDebugIf       
99#endif /* OM_CHECK > 0 */
100
101
102#ifdef OM_ALIGNMENT_NEEDS_WORK
103
104#define omTypeAllocAligned(type,addr,size)             addr=(type)_omDebugAlloc((void*)(size),OM_FSIZE|OM_FALIGN,OM_CTFL)
105#define omTypeAlloc0Aligned(type,addr,size)            addr=(type)_omDebugAlloc((void*)(size),OM_FSIZE|OM_FZERO|OM_FALIGN,OM_CTFL)
106#define omAllocAligned(size)                           _omDebugAlloc((void*)(size),OM_FSIZE|OM_FALIGN,OM_CTFL)
107#define omAlloc0Aligned(size)                          _omDebugAlloc((void*)(size),OM_FSIZE|OM_FZERO|OM_FALIGN,OM_CTFL)
108
109#define omTypeReallocAlignedSize(o_addr,o_size,type,addr,size)         addr=(type)_omDebugRealloc(o_addr,(void*)(o_size),(void*)(size),OM_FSIZE,OM_FSIZE|OM_FALIGN,OM_CTFL)
110#define omTypeRealloc0AlignedSize(o_addr,o_size,type,addr,size)        addr=(type)_omDebugRealloc(o_addr,(void*)(o_size),(void*)(size),OM_FSIZE,OM_FSIZE|OM_FZERO|OM_FALIGN,OM_CTFL)
111#define omReallocAlignedSize(addr,o_size,size)                         _omDebugRealloc(addr,(void*)(o_size),(void*)(size),OM_FSIZE,OM_FSIZE|OM_FALIGN,OM_CTFL)
112#define omRealloc0AlignedSize(addr,o_size,size)                        _omDebugRealloc(addr,(void*)(o_size),(void*)(size),OM_FSIZE,OM_FSIZE|OM_FZERO|OM_FALIGN,OM_CTFL)
113
114#define omTypeReallocAligned(o_addr,type,addr,size)                    addr=(type)_omDebugRealloc(o_addr,NULL,(void*)(size),0,OM_FSIZE|OM_FALIGN,OM_CTFL)
115#define omTypeRealloc0Aligned(o_addr,type,addr,size)                   addr=(type)_omDebugRealloc(o_addr,NULL,(void*)(size),0,OM_FSIZE|OM_FZERO|OM_FALIGN,OM_CTFL)
116#define omReallocAligned(addr,size)                                    _omDebugRealloc(addr,NULL,(void*)(size),0,OM_FSIZE|OM_FALIGN,OM_CTFL)
117#define omRealloc0Aligned(addr,size)                                   _omDebugRealloc(addr,NULL,(void*)(size),0,OM_FSIZE|OM_FZERO|OM_FALIGN,OM_CTFL)
118
119#define omMemDupAligned(addr)                       _omDebugMemDup(addr,OM_FALIGN,OM_CTFL)
120
121#define omDebugAddrAlignedBin(addr, bin)            _omDebugAddr(addr,bin,OM_FBIN|OM_FALIGN,OM_CFL)
122#define omDebugAddrAlignedSize(addr,size)           _omDebugAddr(addr,(void*)(size),OM_FSIZE|OM_FALIGN,OM_CFL)
123#define omDebugAddrAligned(addr)                    _omDebugAddr(addr,NULL, OM_FALIGN, OM_CFL)
124#define omdebugAddrAlignedSize(addr,size)           _omDebugAddr(addr,(void*)(size),OM_FSIZE|OM_FSLOPPY|OM_FALIGN,OM_CFL)
125#define omdebugAddrAligned(addr)                    _omDebugAddr(addr,NULL, OM_FSLOPPY|OM_FALIGN, OM_CFL)
126
127#if OM_CHECK > 0
128#define omCheckAddrAlignedBin    omDebugAddrAlignedBin   
129#define omCheckAddrAlignedSize   omDebugAddrAlignedSize 
130#define omCheckAddrAligned       omDebugAddrAligned     
131#define omcheckAddrAlignedSize   omdebugAddrAlignedSize 
132#define omcheckAddrAligned       omdebugAddrAligned     
133#endif
134#endif /* OM_ALIGNMENT_NEEDS_WORK */
135
136#elif !defined(OM_EMULATE_OMALLOC)
137/*******************************************************************
138 *
139 * Alloc/Free -- the real thing
140 *
141 *******************************************************************/
142#define omTypeAllocBin(type,addr,bin)           __omTypeAllocBin(type,addr,bin)
143#define omTypeAlloc0Bin(type,addr,bin)          __omTypeAlloc0Bin(type,addr,bin)
144#define omAllocBin(bin)                         _omAllocBin(bin)
145#define omAlloc0Bin(bin)                        _omAlloc0Bin(bin)
146
147#define omTypeAlloc(type,addr,size)             __omTypeAlloc(type,addr,size)
148#define omTypeAlloc0(type,addr,size)            __omTypeAlloc0(type,addr,size)
149#define omAlloc(size)                           _omAlloc(size)
150#define omAlloc0(size)                          _omAlloc0(size)
151
152#define omTypeReallocBin(o_addr,o_bin,type,addr,bin)            __omTypeReallocBin(o_addr,o_bin,type,addr,bin)
153#define omTypeRealloc0Bin(o_addr,o_bin,type,addr,bin)           __omTypeRealloc0Bin(o_addr,o_bin,type,addr,bin)
154#define omReallocBin(o_addr,o_bin,bin)                          _omReallocBin(o_addr,o_bin,bin)
155#define omRealloc0Bin(o_addr,o_bin,bin)                         _omRealloc0Bin(o_addr,o_bin,bin)
156
157#define omTypeReallocSize(o_addr,o_size,type,addr,size)         __omTypeReallocSize(o_addr,o_size,type,addr,size)
158#define omTypeRealloc0Size(o_addr,o_size,type,addr,size)        __omTypeRealloc0Size(o_addr,o_size,type,addr,size)
159#define omReallocSize(addr,o_size,size)                         _omReallocSize(addr,o_size,size)
160#define omRealloc0Size(addr,o_size,size)                        _omRealloc0Size(addr,o_size,size)
161
162#define omTypeRealloc(o_addr,type,addr,size)                    __omTypeRealloc(o_addr,type,addr,size)
163#define omTypeRealloc0(o_addr,type,addr,size)                   __omTypeRealloc0(o_addr,type,addr,size)
164#define omRealloc(addr,size)                                    _omRealloc(addr,size)
165#define omRealloc0(addr,size)                                   _omRealloc0(addr,size)
166
167#define omalloc(size)   _omalloc(size)
168#define omalloc0(size)  _omalloc0(size)
169#define omcalloc(n,size)_omalloc0(n*size)
170
171#define omreallocSize(addr,o_size,size) _omreallocSize(addr,o_size,size)
172#define omrealloc0Size(addr,o_size,size)_omrealloc0Size(addr,o_size,size)
173#define omrealloc(addr,size)            _omrealloc(addr, size)
174#define omrealloc0(addr,size)           _omrealloc0(addr, size)
175
176#define omfreeSize(addr,size)   do {if (addr && size) omFreeSize(addr, size);} while (0)
177#define omfree(addr)            do {if (addr) omFree(addr);} while (0)
178
179#ifdef OM_ALIGNMENT_NEEDS_WORK
180#define omTypeAllocAligned(type,addr,size)      __omTypeAllocAligned(type,addr,size)
181#define omTypeAlloc0Aligned(type,addr,size)     __omTypeAlloc0Aligned(type,addr,size)
182#define omAllocAligned(size)                    _omAllocAligned(size)
183#define omAlloc0Aligned(size)                   _omAlloc0Aligned(size)
184
185#define omTypeReallocAlignedSize(o_addr,o_size,type,addr,size)  __omTypeReallocAlignedSize(o_addr,o_size,type,addr,size)
186#define omTypeRealloc0AlignedSize(o_addr,o_size,type,addr,size) __omTypeRealloc0AlignedSize(o_addr,o_size,type,addr,size)
187#define omReallocAlignedSize(addr,o_size,size)                  _omReallocAlignedSize(addr,o_size,size)
188#define omRealloc0AlignedSize(addr,o_size,size)                 _omRealloc0AlignedSize(addr,o_size,size)
189
190#define omTypeReallocAligned(o_addr,type,addr,size)             __omTypeReallocAligned(o_addr,type,addr,size)
191#define omTypeRealloc0Aligned(o_addr,type,addr,size)            __omTypeRealloc0Aligned(o_addr,type,addr,size)
192#define omReallocAligned(addr,size)                             _omReallocAligned(addr,size)
193#define omRealloc0Aligned(addr,size)                            _omRealloc0Aligned(addr,size)
194
195#define omMemDupAligned(addr)                                   _omMemDupAligned(addr)
196#endif  /* OM_ALIGNMENT_NEEDS_WORK */
197
198#define omFreeBin(addr,bin)     __omFreeBin(addr,bin)
199#define omFreeSize(addr,size)   __omFreeSize(addr,size)
200#define omFree(addr)            __omFree(addr)
201
202#define omStrDup(s)         _omStrDup(s)
203#define omMemDup(s)         _omMemDup(s)
204
205
206
207#else /* OM_EMULATE_OMALLOC */
208/*******************************************************************
209 *
210 * Emulation of omalloc's Alloc/Free interface
211 *
212 *******************************************************************/
213
214#include "omMalloc.h"
215
216extern void* omEmulateCalloc(size_t size);
217extern void* omEmulateRealloc0Size(void* o_addr, size_t o_size, size_t n_size);
218extern void* omEmulateRealloc0(void* o_addr, size_t n_size);
219
220#define omTypeAllocBin(type,addr,bin)           addr=(type) OM_MALLOC_MALLOC(bin->sizeW << LOG_SIZEOF_LONG)
221#define omTypeAlloc0Bin(type,addr,bin)          addr=(type) omEmulateAlloc0(bin->sizeW << LOG_SIZEOF_LONG)
222#define omAllocBin(bin)                         OM_MALLOC_MALLOC(bin->sizeW << LOG_SIZEOF_LONG)
223#define omAlloc0Bin(bin)                        omEmulateAlloc0(bin->sizeW << LOG_SIZEOF_LONG)
224
225#define omTypeAlloc(type,addr,size)             addr=(type) OM_MALLOC_MALLOC(size)
226#define omTypeAlloc0(type,addr,size)            addr=(type) omEmulateAlloc0(size)
227#define omAlloc(size)                           OM_MALLOC_MALLOC(size)             
228#define omAlloc0(size)                          omEmulateAlloc0(size)             
229
230#define omTypeReallocBin(o_addr,o_bin,type,addr,bin)            addr=(type)OM_MALLOC_REALLOC(o_addr,bin->sizeW << LOG_SIZEOF_LONG)                   
231#define omTypeRealloc0Bin(o_addr,o_bin,type,addr,bin)           addr=(type)omEmulateRealloc0Size(o_addr,o_bin->sizeW << LOG_SIZEOF_LONG,bin->sizeW << LOG_SIZEOF_LONG)
232#define omReallocBin(o_addr,o_bin,bin)                          OM_MALLOC_REALLOC(o_addr,bin->sizeW << LOG_SIZEOF_LONG)                               
233#define omRealloc0Bin(o_addr,o_bin,bin)                         omEmulateRealloc0Size(o_addr,o_bin->sizeW << LOG_SIZEOF_LONG,bin->sizeW << LOG_SIZEOF_LONG)           
234                                                               
235#define omTypeReallocSize(o_addr,o_size,type,addr,size)         addr=(type)OM_MALLOC_REALLOC(o_addr,size)                   
236#define omTypeRealloc0Size(o_addr,o_size,type,addr,size)        addr=(type)omEmulateRealloc0Size(o_addr,o_size,size)
237#define omReallocSize(addr,o_size,size)                         OM_MALLOC_REALLOC(addr,size)                               
238#define omRealloc0Size(addr,o_size,size)                        omEmulateRealloc0Size(addr,o_size,size)           
239                                                               
240#define omTypeRealloc(o_addr,type,addr,size)                    addr=(type)OM_MALLOC_REALLOC(o_addr,size)           
241#define omTypeRealloc0(o_addr,type,addr,size)                   addr=(type)omEmulateRealloc0(o_addr,size)
242#define omRealloc(addr,size)                                    OM_MALLOC_REALLOC(addr,size)                       
243#define omRealloc0(addr,size)                                   omEmulateRealloc0(addr,size)           
244                                                               
245#define omFreeBin(addr,bin)     OM_MALLOC_FREE(addr)
246#define omFreeSize(addr,size)   OM_MALLOC_FREE(addr)     
247#define omFree(addr)            OM_MALLOC_FREE(addr)           
248#endif /* ! debug && ! the real thing */
249
250
251/* define alignment stuff, if necessary */
252#if !defined(omTypeAllocAligned)
253#define omTypeAllocAligned      omTypeAlloc
254#define omTypeAlloc0Aligned     omTypeAlloc0
255#define omAllocAligned          omAlloc
256#define omAlloc0Aligned         omAlloc0
257
258#define omTypeReallocAlignedSize     omTypeReallocSize 
259#define omTypeRealloc0AlignedSize    omTypeRealloc0Size
260#define omReallocAlignedSize         omReallocSize     
261#define omRealloc0AlignedSize        omRealloc0Size     
262                                                       
263#define omTypeReallocAligned         omTypeRealloc     
264#define omTypeRealloc0Aligned        omTypeRealloc0     
265#define omReallocAligned             omRealloc         
266#define omRealloc0Aligned            omRealloc0
267
268#define omMemDupAligned     omMemDup
269#endif /* !defined(omTypeAllocAligned) */
270
271#if !defined(omDebugAddrAlignedBin)
272#define omDebugAddrAlignedBin   omDebugAddrBin           
273#define omDebugAddrAlignedSize  omDebugAddrSize         
274#define omDebugAddrAligned      omDebugAddr                   
275#define omdebugAddrAlignedSize  omdebugAddrSize         
276#define omdebugAddrAligned      omdebugAddr
277#endif /* !defined(omDebugAddrAlignedBin) */
278
279#if !defined(omCheckAddrAlignedBin)
280#define omCheckAddrAlignedBin   omDebugAddrBin           
281#define omCheckAddrAlignedSize  omDebugAddrSize         
282#define omCheckAddrAligned      omDebugAddr                   
283#define omcheckAddrAlignedSize  omdebugAddrSize         
284#define omcheckAddrAligned      omdebugAddr
285#endif /* !defined(omCheckAddrAlignedBin) */
286 
287/* define debug stuff, if necessary */
288#if !defined(omDebugAddrBin)
289#define omDebugIf(cond, test)                    ((void) 0)
290#define omDebugAddrBin(addr,bin)                 ((void) 0)
291#define omDebugAddrSize(addr,size)               ((void) 0)                       
292#define omDebugAddr(addr)                        ((void) 0)                               
293#define omdebugAddrSize(addr,size)               ((void) 0)                       
294#define omdebugAddr(addr)                        ((void) 0)                               
295#define omDebugBin(bin)                          ((void) 0)                               
296#define omDebugMemory()                          ((void) 0)
297#endif /* !defined(omDebugAddrBin) */
298
299/* define check stuff, if necessary */
300#if !defined(omCheckAddrBin)
301#define omCheckIf(cond, test)                    ((void) 0)
302#define omCheckAddrBin(addr,bin)                 ((void) 0)
303#define omCheckAddrSize(addr,size)               ((void) 0)                       
304#define omCheckAddr(addr)                        ((void) 0)                               
305#define omcheckAddrSize(addr,size)               ((void) 0)                       
306#define omcheckAddr(addr)                        ((void) 0)                               
307#define omCheckBin(bin)                          ((void) 0)                               
308#define omCheckMemory()                          ((void) 0)                               
309#endif /* !defined(omCheckAddrBin) */
310
311
312
313#if !defined(OM_NDEBUG) && !defined(OM_EMULATE_MALLOC)
314omError_t omTestAddrBin(void* addr, omBin bin, int check_level);
315omError_t omTestAddrSize(void* addr, size_t size, int check_level);
316omError_t omTestAddr(void* addr, int check_level);
317omError_t omtestAddrSize(void* addr, size_t size, int check_level);
318omError_t omtestAddr(void* addr, int check_level);
319omError_t omTestAddrAlignedBin(void* addr, omBin bin, int check_level);
320omError_t omTestAddrAlignedSize(void* addr, size_t size, int check_level);
321omError_t omTestAddrAligned(void* addr, int check_level);
322omError_t omtestAddrAlignedSize(void* addr, size_t size, int check_level);
323omError_t omtestAddrAligned(void* addr, int check_level);
324omError_t omTestBin(omBin bin, int check_level);
325omError_t omTestMemory(int check_level);
326#define omTestIf(cond, statement)           do { if (cond) {statement;}} while (0)
327
328#else
329
330#define omTestIf(cond, test)                      ((void) 0)
331#define omTestAddrBin(addr,bin,l)                 ((void) 0)
332#define omTestAddrSize(addr,size,l)               ((void) 0)                       
333#define omTestAddr(addr,l)                        ((void) 0)                               
334#define omtestAddrSize(addr,size,l)               ((void) 0)                       
335#define omtestAddr(addr,l)                        ((void) 0)                               
336#define omTestAddrAlignedBin(addr,bin,l)                 ((void) 0)
337#define omTestAddrAlignedSize(addr,size,l)               ((void) 0)                       
338#define omTestAddrAligned(addr,l)                        ((void) 0)
339#define omtestAddrAlignedSize(addr,size,l)               ((void) 0) 
340#define omtestAddrAligned(addr,l)                        ((void) 0)
341#define omTestBin(bin,l)                          ((void) 0)                               
342#define omTestMemory(l)                           ((void) 0)                               
343
344#endif
345
346#endif /* OM_ALLOC_DECL_H */
347
Note: See TracBrowser for help on using the repository browser.