My Project
Loading...
Searching...
No Matches
omDebugCheck.c
Go to the documentation of this file.
1/*******************************************************************
2 * File: omDebugCheck.c
3 * Purpose: implementation of omCheck functions
4 * Author: obachman@mathematik.uni-kl.de (Olaf Bachmann)
5 * Created: 11/99
6 *******************************************************************/
7#include <limits.h>
8#include <stdarg.h>
9
10#include "omalloc.h"
11#include "omDebug.h"
12
13#ifndef OM_NDEBUG
14/*******************************************************************
15 *
16 * Declarations: Static function
17 *
18 *******************************************************************/
19unsigned long om_MaxAddr = 0;
20unsigned long om_MinAddr = ULONG_MAX;
21static omError_t omDoCheckLargeAddr(void* addr, void* bin_size, omTrackFlags_t flags, char level,
22 omError_t report, OM_FLR_DECL);
23omError_t omDoCheckBin(omBin bin, int normal_bin, char level,
24 omError_t report, OM_FLR_DECL);
25static omError_t omDoCheckBinPage(omBinPage page, int normal_page, int level,
26 omError_t report, OM_FLR_DECL);
27static void _omPrintAddrInfo(FILE* fd, omError_t error, void* addr, void* bin_size, omTrackFlags_t flags, int max_frames, const char* s);
28
29
30/*******************************************************************
31 *
32 * First level omCheck routines: dispatch to lower-level omDoCheck
33 * routines which do the actual tests
34 *
35 *******************************************************************/
36omError_t _omCheckAddr(void* addr, void* size_bin,
37 omTrackFlags_t flags, char check, omError_t report, OM_FLR_DECL)
38{
39 if (check <= 0) return omError_NoError;
40 if (check > 1)
41 {
42 omCheckReturn(check > 2 && _omCheckMemory(check - 2, (report ? report : omError_MemoryCorrupted), OM_FLR_VAL));
44 (report ? report : omError_MemoryCorrupted), OM_FLR_VAL));
45 }
46 return omDoCheckAddr(addr, size_bin, flags, check, report, OM_FLR_VAL);
47}
48
49omError_t _omCheckBin(omBin bin, int what_bin, char check, omError_t report, OM_FLR_DECL)
50{
51 if (check <= 0) return omError_NoError;
52
53 omCheckReturn(check > 1 && _omCheckMemory(check - 1, (report ? report : omError_MemoryCorrupted), OM_FLR_VAL));
54
55 return omDoCheckBin(bin, what_bin, check, report, OM_FLR_VAL);
56}
57
58omError_t _omCheckMemory(char check, omError_t report, OM_FLR_DECL)
59{
60 int i = 0;
61 omSpecBin s_bin;
62 omBin sticky;
63
64 if (check <= 0) return omError_NoError;
65
66 omCheckReturn(omCheckBinPageRegions(check, report, OM_FLR_VAL));
67
68 for (i=0; i<= OM_MAX_BIN_INDEX; i++)
69 {
70 omCheckReturn(omDoCheckBin(&om_StaticBin[i], 1, check, report, OM_FLR_VAL));
71 }
72
73 s_bin = om_SpecBin;
75 while (s_bin != NULL)
76 {
77 omCheckReturn(omDoCheckBin(s_bin->bin, 1, check, report, OM_FLR_VAL));
78 s_bin = s_bin->next;
79 }
80
81 sticky = om_StickyBins;
83 while (sticky != NULL)
84 {
85 omCheckReturn(omDoCheckBin(sticky, 1, check, report, OM_FLR_VAL));
86 sticky = sticky->next;
87 }
88
89#ifdef OM_HAVE_TRACK
90 for (i=0; i<= OM_MAX_BIN_INDEX; i++)
91 {
92 omCheckReturn(omDoCheckBin(&om_StaticTrackBin[i], 0, check, report, OM_FLR_VAL));
93 }
94 s_bin = om_SpecTrackBin;
96 while (s_bin != NULL)
97 {
98 omCheckReturn(omDoCheckBin(s_bin->bin, 0, check, report, OM_FLR_VAL));
99 s_bin = s_bin->next;
100 }
101#endif
102
103 if (check > 1)
104 {
105 if (om_KeptAddr != NULL)
106 {
107 void* addr = om_KeptAddr;
108 omCheckReturn(omCheckList(om_KeptAddr, check - 1, (report ? report : omError_KeptAddrListCorrupted), OM_FLR_VAL));
109 while (addr != NULL)
110 {
111 omCheckReturn(omDoCheckAddr(addr, NULL, OM_FKEPT, check, report, OM_FLR_VAL));
112 addr = *((void**) addr);
113 }
114 }
116 {
117 void* addr = om_AlwaysKeptAddrs;
119 while (addr != NULL)
120 {
121 omCheckReturn(omDoCheckAddr(addr, NULL, OM_FKEPT, check, report, OM_FLR_VAL));
122 addr = *((void**) addr);
123 }
124 }
125 }
126
127 return omError_NoError;
128}
129
130/*******************************************************************
131 *
132 * Second level omCheck routines: do the actual checks
133 *
134 *******************************************************************/
135
136omError_t omCheckPtr(const void* ptr, omError_t report, OM_FLR_DECL)
137{
139 omCheckReturnError(!OM_IS_ALIGNED(ptr), omError_UnalignedAddr);
140 omCheckReturnError(((unsigned long) ptr) < om_MinAddr ||
141 ((unsigned long) ptr) >= om_MaxAddr, omError_InvalidRangeAddr);
142 return omError_NoError;
143}
144
145
146omError_t omDoCheckAddr(void* addr, void* bin_size, omTrackFlags_t flags, char level,
147 omError_t report, OM_FLR_DECL)
148{
149 if (level <= 0) return omError_NoError;
150 omAssume(! ((flags & OM_FSIZE) && (flags & OM_FBIN)));
151
152 if (addr == NULL)
153 {
155 return omError_NoError;
156 }
157 if ((flags & OM_FSIZE) && bin_size == NULL) return omError_NoError;
158 omAddrCheckReturn(omCheckPtr(addr, report, OM_FLR_VAL));
159 omAddrCheckReturnError((flags & OM_FALIGN) && !OM_IS_STRICT_ALIGNED(addr), omError_UnalignedAddr);
161
162 if (omIsBinPageAddr(addr))
163 {
164#ifdef OM_HAVE_TRACK
165 if (omIsBinAddrTrackAddr(addr))
166 return omCheckTrackAddr(addr, bin_size, flags, level, report, OM_FLR_VAL);
167 else
168#endif
169 return omDoCheckBinAddr(addr, bin_size, flags, level, report, OM_FLR_VAL);
170 }
171 else
172 {
173 return omDoCheckLargeAddr(addr, bin_size, flags, level, report, OM_FLR_VAL);
174 }
175}
176
177
178
179static omError_t omDoCheckLargeAddr(void* addr, void* bin_size, omTrackFlags_t flags, char level,
180 omError_t report, OM_FLR_DECL)
181{
182 size_t r_size;
183
184 omAssume(! omIsBinPageAddr(addr));
185 omAssume(! omCheckPtr(addr, omError_NoError, OM_FLR));
186
189 r_size = omSizeOfLargeAddr(addr);
192 omAddrCheckReturnError((flags & OM_FSIZE) && r_size < OM_ALIGN_SIZE((size_t) bin_size),
195 return omError_NoError;
196}
197
198omError_t omDoCheckBinAddr(void* addr, void* bin_size, omTrackFlags_t flags, char level,
199 omError_t report, OM_FLR_DECL)
200{
201 omBinPage page = omGetBinPageOfAddr(addr);
202 omBinPageRegion region = page->region;
203 omBin bin = omGetBinOfPage(page);
204
206 omAssume(! omCheckPtr(addr, 0, OM_FLR));
207
209
210 if (flags & OM_FBINADDR && flags & OM_FSIZE)
211 omAddrCheckReturnError(bin->sizeW*SIZEOF_LONG != (size_t) bin_size, omError_WrongSize);
212
213 if (level > 1)
214 {
218
219 if (flags & OM_FUSED)
220 {
223 }
224 }
225 else
226 {
228 }
229
230
231 /* Check that addr is aligned within page of bin */
232 omAddrCheckReturnError((bin->max_blocks >= 1) &&
233 ( ( ( (unsigned long) addr)
234 - ((unsigned long) page)
236 % (bin->sizeW * SIZEOF_VOIDP)
237 != 0), omError_FalseAddr);
238
239 /* Check that specified bin or size is correct */
240 omAddrCheckReturnError((flags & OM_FBIN) && bin_size != NULL
241 && ((omBin) bin_size) != omGetTopBinOfAddr(addr), omError_WrongBin);
242
243 if ((flags & OM_FSIZE) && (!(flags & OM_FSLOPPY) || (size_t) bin_size > 0))
244 {
245 size_t size = (size_t) bin_size;
247 omAddrCheckReturnError((bin->sizeW << LOG_SIZEOF_LONG) < OM_ALIGN_SIZE(size), omError_WrongSize);
248 }
249
250 return omError_NoError;
251}
252
253omError_t omDoCheckBin(omBin bin, int normal_bin, char level,
254 omError_t report, OM_FLR_DECL)
255{
256 omBin top_bin = bin;
257
259 if (! omIsStickyBin(bin))
260 omCheckReturn(omCheckGList(bin->next, next, level, report, OM_FLR_VAL));
261
262 do
263 {
264 int where;
265 omBinPage page;
266
267 if (bin->last_page == NULL || bin->current_page == om_ZeroPage)
268 {
269 omCheckReturnCorrupted(! (bin->current_page == om_ZeroPage && bin->last_page == NULL));
270 continue;
271 }
272 omCheckReturn(omDoCheckBinPage(bin->current_page, normal_bin, level, report, OM_FLR_VAL));
273 omCheckReturn(bin->current_page != bin->last_page &&
274 omDoCheckBinPage(bin->last_page, normal_bin, level, report, OM_FLR_VAL));
275 omCheckReturnCorrupted(bin->last_page->next != NULL);
276
277 if (bin != top_bin)
278 {
279 omCheckReturnCorrupted(bin->sizeW != top_bin->sizeW ||
280 bin->max_blocks != top_bin->max_blocks);
281 }
282 if (level <= 1) continue;
283
284 if (! omIsStickyBin(bin))
285 omCheckReturnCorrupted(omFindInGList(bin->next, next, sticky, bin->sticky));
286 omCheckReturn(omCheckGList(bin->last_page, prev, level-1, report, OM_FLR_VAL));
287 page = omGListLast(bin->last_page, prev);
288 omCheckReturn(omCheckGList(page, next, level-1, report, OM_FLR_VAL));
289 omCheckReturnCorrupted(omGListLength(bin->last_page, prev) != omGListLength(page, next));
290
291 omCheckReturnCorrupted(! omIsOnGList(bin->last_page, prev, bin->current_page));
292
293 page = bin->last_page;
294 where = 1;
295 while (page != NULL)
296 {
298 omCheckReturn(page != bin->last_page && page != bin->current_page &&
299 omDoCheckBinPage(page, normal_bin, level - 1, report, OM_FLR_VAL));
300
301 omCheckReturnCorrupted(page != bin->last_page &&
302 (page->next == NULL || page->next->prev != page));
303 omCheckReturnCorrupted(page->prev != NULL && page->prev->next != page);
304
305 omCheckReturnCorrupted(omGetStickyOfPage(page) != bin->sticky && bin->sticky < SIZEOF_VOIDP);
307
308 if (where == -1)
309 {
310 /* we are at the left of current_page,
311 i.e., page is empty */
312 omCheckReturnCorrupted(omGetUsedBlocksOfPage(page) != 0 || page->current != NULL);
313 }
314 else
315 {
316 if (page == bin->current_page)
317 {
318 where = -1;
319 }
320 else
321 {
322 /* we are at the right of current_page,
323 i.e., page is neither full nor empty */
324 omCheckReturnCorrupted(page->current == NULL ||
325 omGetUsedBlocksOfPage(page) == bin->max_blocks - 1);
326 }
327 }
328 page = page->prev;
329 } /* while (page != NULL) */
330 } while (!omIsStickyBin(bin) && ((bin = bin->next) != NULL));
331
332 return omError_NoError;
333}
334
335
336static omError_t omDoCheckBinPage(omBinPage page, int normal_page, int level,
337 omError_t report, OM_FLR_DECL)
338{
339 omBin bin;
340
341 omCheckReturn(omCheckPtr(page, report, OM_FLR_VAL));
343
344 omCheckReturn(omCheckPtr(page->region, report, OM_FLR_VAL));
345 omCheckReturnCorrupted(level > 1 && omFindRegionOfAddr(page) != page->region);
346
347
348#ifdef OM_HAVE_TRACK
349 if (! normal_page)
350 {
351 omCheckReturnCorrupted(! omIsSetTrackOfUsedBlocks(page->used_blocks));
352 }
353 else
354#endif
355 omAssume(normal_page);
356
357 bin = omGetTopBinOfPage(page);
358 if (bin->max_blocks > 1)
359 {
360 omCheckReturnCorrupted(omGetUsedBlocksOfPage(page) > bin->max_blocks - 1);
361 omCheckReturnCorrupted(omGetUsedBlocksOfPage(page) == bin->max_blocks - 1 &&
362 page->current != NULL);
364 }
365 else
366 {
368 }
369
370 omCheckReturn(omCheckList(page->current, level, report, OM_FLR_VAL));
371
372 if (level > 1)
373 {
374 void* current = page->current;
375
376 omCheckReturnCorrupted(current != NULL &&
377 omListLength(current) != bin->max_blocks - omGetUsedBlocksOfPage(page) - 1);
378
379 while (current != NULL)
380 {
381 omCheckReturnCorrupted(omGetPageOfAddr(current) != page);
382
383 omCheckReturnCorrupted( ( ( (unsigned long) current)
384 - ((unsigned long) page)
386 % (bin->sizeW * SIZEOF_LONG)
387 != 0);
388 current = *((void**) current);
389 }
390 }
391 return omError_NoError;
392}
393
394omError_t omReportAddrError(omError_t error, omError_t report_error, void* addr, void* bin_size, omTrackFlags_t flags,
395 OM_FLR_DECL, const char* fmt, ...)
396{
397 int max_check, max_track;
398 va_list ap;
399 va_start(ap, fmt);
400
401 /* reset MaxTrack and MaxCheck to prevent infinite loop, in case
402 printf allocates memory */
403 max_check = om_Opts.MaxCheck;
404 max_track = om_Opts.MaxTrack;
405 om_Opts.MaxCheck = 0;
406 om_Opts.MaxTrack = 0;
407
409 omReportError(error, report_error, OM_FLR_VAL, fmt, ap);
411
413 _omPrintAddrInfo(stderr, error, addr, bin_size, flags, 10, " occurred for");
414 om_Opts.ErrorHook();
415
416 om_Opts.MaxCheck = max_check;
417 om_Opts.MaxTrack = max_track;
418 return om_ErrorStatus;
419}
420
421static void _omPrintAddrInfo(FILE* fd, omError_t error, void* addr, void* bin_size, omTrackFlags_t flags, int frames, const char* s)
422{
423 int x;
424 if ((! (x=omCheckPtr(addr, omError_MaxError, OM_FLR)))
426 {
427 fprintf(fd, "%s addr:%p size:%ld", s, addr, (long)omSizeOfAddr(addr));
428
430 fputs(" unaligned",fd);
431
433 fprintf(fd, " specified size:%ld", (long) bin_size);
434
435 if (error == omError_WrongBin && (flags & OM_FBIN))
436 fprintf(fd, " specified bin is of size:%ld",
437 (long)((omBin) bin_size)->sizeW << LOG_SIZEOF_LONG);
438
439 if (omIsTrackAddr(addr))
440 omPrintTrackAddrInfo(fd, addr, frames);
441 else
442 {
443 fputs(" !omIsTrackAddr\n",fd);
444 omPrintTrackAddrInfo(fd, addr, frames);
445 }
446 }
447 else
448 {
449 fprintf(fd, "%s (invalid) addr: %p (error=%d)\n", s, addr,x);
450 }
451}
452
453void omPrintAddrInfo(FILE* fd, void *addr, const char* s)
454{
455 _omPrintAddrInfo(fd, omError_NoError, addr, NULL, 0, 10, s);
456}
457
458/*******************************************************************
459 *
460 * Misc for iterating, etc.
461 *
462 *******************************************************************/
463
464void omIterateTroughBinAddrs(omBin bin, void (*CallBackUsed)(void*), void (*CallBackFree)(void*))
465{
466 omBinPage page;
467 char* addr;
468 int is_free;
469 int i;
470
471 do
472 {
473 page = bin->last_page;
474 while (page != NULL)
475 {
476 addr = (char*) page + SIZEOF_OM_BIN_PAGE_HEADER;
477 i = 0;
478 do
479 {
480 is_free = omIsOnList(page->current, addr) != NULL
481 || omIsInKeptAddrList(addr);
482 if (is_free)
483 {
484 if (CallBackFree != NULL) CallBackFree(addr);
485 }
486 else
487 {
488 if (CallBackUsed != NULL) CallBackUsed(addr);
489 }
490 addr = (char *)((char**) addr) + bin->sizeW;
491 i++;
492 } while (i < bin->max_blocks);
493 page = page->prev;
494 }
495 if (omIsStickyBin(bin))
496 bin = NULL;
497 else
498 bin = bin->next;
499 } while (bin != NULL);
500
501}
502
503void omIterateTroughAddrs(int normal, int track, void (*CallBackUsed)(void*), void (*CallBackFree)(void*))
504{
505 int i;
506 omSpecBin s_bin;
507 omBin sticky;
508
509 if (normal)
510 {
511 for (i=0; i<=OM_MAX_BIN_INDEX; i++)
512 {
513 omIterateTroughBinAddrs(&om_StaticBin[i], CallBackUsed, CallBackFree);
514 }
515 s_bin = om_SpecBin;
516 while (s_bin != NULL)
517 {
518 omIterateTroughBinAddrs(s_bin->bin, CallBackUsed, CallBackFree);
519 s_bin = s_bin->next;
520 }
521 }
522
523#ifdef OM_HAVE_TRACK
524 if (track)
525 {
526 for (i=0; i<=OM_MAX_BIN_INDEX; i++)
527 {
528 omIterateTroughBinAddrs(&om_StaticTrackBin[i], CallBackUsed, CallBackFree);
529 }
530 s_bin = om_SpecTrackBin;
531 while (s_bin != NULL)
532 {
533 omIterateTroughBinAddrs(s_bin->bin, CallBackUsed, CallBackFree);
534 s_bin = s_bin->next;
535 }
536 }
537#endif
538 sticky = om_StickyBins;
539 while (sticky != NULL)
540 {
541 omIterateTroughBinAddrs(sticky, CallBackUsed, CallBackFree);
542 sticky = sticky->next;
543 }
544}
545
547static size_t om_total_used_size;
548static unsigned long om_total_used_blocks;
550
551static void _omPrintUsedAddr(void* addr)
552{
553 if (!omIsTrackAddr(addr) || !omIsStaticTrackAddr(addr))
554 {
557 if (om_print_frames > 0)
558 {
560 fputc('\n',om_print_used_addr_fd);
561 }
562 }
563}
564
565void omPrintUsedAddrs(FILE* fd, int max)
566{
569 om_print_used_addr_fd = (fd == NULL ? stdout : fd);
572 fprintf(fd, "UsedAddrs Summary: UsedBlocks:%ld TotalSize:%ld\n",
574}
575
577{
580 om_print_used_addr_fd = (fd == NULL ? stdout : fd);
583 fprintf(fd, "UsedTrackAddrs Summary: UsedBlocks:%ld TotalSize:%ld\n",
585}
586#endif /* ! OM_NDEBUG */
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600
int level(const CanonicalForm &f)
int i
Definition: cfEzgcd.cc:132
Variable x
Definition: cfModGcd.cc:4082
const CanonicalForm int s
Definition: facAbsFact.cc:51
static int max(int a, int b)
Definition: fast_mult.cc:264
ListNode * next
Definition: janet.h:31
VAR int check
Definition: libparse.cc:1106
#define error(a)
Definition: mpr_numeric.cc:966
Definition: ap.h:40
#define omGetTopBinOfAddr(addr)
#define SIZEOF_OM_BIN_PAGE_HEADER
#define omGetTopBinOfPage(page)
#define omGetBinOfAddr(addr)
omBin om_StickyBins
Definition: omBin.c:374
omBin_t om_StaticBin[]
#define omGetStickyOfPage(page)
size_t omSizeOfLargeAddr(void *addr)
size_t omSizeOfAddr(const void *addr)
omError_t omCheckBinPageRegions(int level, omError_t report, OM_FLR_DECL)
Definition: omBinPage.c:531
omBinPageRegion omFindRegionOfAddr(void *addr)
Definition: omBinPage.c:578
int omIsAddrOnFreeBinPage(void *addr)
Definition: omBinPage.c:595
#define omGetBinPageOfAddr(addr)
Definition: omBinPage.h:22
#define omIsBinPageAddr(addr)
Definition: omBinPage.h:68
#define omIsAddrPageAligned(addr)
Definition: omBinPage.h:16
#define omGetPageOfAddr(addr)
Definition: omBinPage.h:19
#define omIsKnownTopBin(bin, normal_bin)
Definition: omBin.h:55
#define omIsStickyBin(bin)
Definition: omBin.h:33
unsigned long om_MaxAddr
Definition: omDebugCheck.c:19
static omError_t omDoCheckLargeAddr(void *addr, void *bin_size, omTrackFlags_t flags, char level, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:179
static FILE * om_print_used_addr_fd
Definition: omDebugCheck.c:546
omError_t _omCheckBin(omBin bin, int what_bin, char check, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:49
static omError_t omDoCheckBinPage(omBinPage page, int normal_page, int level, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:336
omError_t _omCheckAddr(void *addr, void *size_bin, omTrackFlags_t flags, char check, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:36
omError_t omDoCheckAddr(void *addr, void *bin_size, omTrackFlags_t flags, char level, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:146
unsigned long om_MinAddr
Definition: omDebugCheck.c:20
omError_t omReportAddrError(omError_t error, omError_t report_error, void *addr, void *bin_size, omTrackFlags_t flags, OM_FLR_DECL, const char *fmt,...)
Definition: omDebugCheck.c:394
static void _omPrintUsedAddr(void *addr)
Definition: omDebugCheck.c:551
omError_t _omCheckMemory(char check, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:58
omError_t omDoCheckBin(omBin bin, int normal_bin, char level, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:253
omError_t omCheckPtr(const void *ptr, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:136
void omIterateTroughBinAddrs(omBin bin, void(*CallBackUsed)(void *), void(*CallBackFree)(void *))
Definition: omDebugCheck.c:464
static size_t om_total_used_size
Definition: omDebugCheck.c:547
static unsigned long om_total_used_blocks
Definition: omDebugCheck.c:548
void omIterateTroughAddrs(int normal, int track, void(*CallBackUsed)(void *), void(*CallBackFree)(void *))
Definition: omDebugCheck.c:503
static int om_print_frames
Definition: omDebugCheck.c:549
omError_t omDoCheckBinAddr(void *addr, void *bin_size, omTrackFlags_t flags, char level, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:198
static void _omPrintAddrInfo(FILE *fd, omError_t error, void *addr, void *bin_size, omTrackFlags_t flags, int max_frames, const char *s)
Definition: omDebugCheck.c:421
void * om_AlwaysKeptAddrs
Definition: omDebug.c:31
void * om_KeptAddr
Definition: omDebug.c:28
#define OM_FBINADDR
Definition: omDebug.h:40
#define OM_FSLOPPY
Definition: omDebug.h:39
#define omGetUsedBlocksOfPage(page)
Definition: omDebug.h:88
#define OM_FKEPT
Definition: omDebug.h:35
#define OM_FALIGN
Definition: omDebug.h:38
#define OM_FSIZE
Definition: omDebug.h:33
#define OM_FBIN
Definition: omDebug.h:32
#define omAddrCheckReturnError(cond, error)
Definition: omDebug.h:186
unsigned short omTrackFlags_t
Definition: omDebug.h:45
#define omIsStaticTrackAddr(addr)
Definition: omDebug.h:150
#define omCheckReturnError(cond, error)
Definition: omDebug.h:172
#define omAddrCheckReturn(cond)
Definition: omDebug.h:176
#define omCheckReturnCorrupted(cond)
Definition: omDebug.h:174
#define omIsBinAddrTrackAddr(addr)
Definition: omDebug.h:15
#define omIsTrackAddr(addr)
Definition: omDebug.h:12
#define omAddrCheckReturnCorrupted(cond)
Definition: omDebug.h:188
#define OM_FUSED
Definition: omDebug.h:34
#define omCheckReturn(cond)
Definition: omDebug.h:170
int omIsInKeptAddrList(void *addr)
Definition: omDebugTrack.c:743
omError_t om_ErrorStatus
Definition: omError.c:13
int om_CallErrorHook
Definition: omError.c:77
omError_t omReportError(omError_t error, omError_t report_error, OM_FLR_DECL, const char *fmt,...)
Definition: omError.c:80
#define omAssume(x)
Definition: omError.h:85
@ omError_WrongSize
Definition: omError.h:26
@ omError_NullAddr
Definition: omError.h:22
@ omError_MaxError
Definition: omError.h:42
@ omError_UnalignedAddr
Definition: omError.h:32
@ omError_MemoryCorrupted
Definition: omError.h:21
@ omError_FreedAddr
Definition: omError.h:27
@ omError_UnknownBin
Definition: omError.h:30
@ omError_FreedAddrOrMemoryCorrupted
Definition: omError.h:28
@ omError_KeptAddrListCorrupted
Definition: omError.h:36
@ omError_NotBinAddr
Definition: omError.h:31
@ omError_InvalidRangeAddr
Definition: omError.h:23
@ omError_FalseAddr
Definition: omError.h:24
@ omError_WrongBin
Definition: omError.h:29
@ omError_NoError
Definition: omError.h:18
@ omError_FalseAddrOrMemoryCorrupted
Definition: omError.h:25
enum omError_e omError_t
Definition: omError.h:44
OM_INLINE_DECL omBin omGetBinOfPage(omBinPage page)
#define NULL
Definition: omList.c:12
#define omIsOnList(ptr, addr)
Definition: omList.h:68
#define omFindInGList(ptr, next, what, value)
Definition: omList.h:104
#define omCheckGList(ptr, next, level, report, OM_FLR_VAL)
Definition: omList.h:115
#define omGListLength(ptr, next)
Definition: omList.h:94
#define omListLength(ptr)
Definition: omList.h:62
#define omGListLast(ptr, next)
Definition: omList.h:96
#define omIsOnGList(ptr, next, addr)
Definition: omList.h:100
#define omCheckList(ptr, level, report, OM_FLR_VAL)
Definition: omList.h:83
omOpts_t om_Opts
Definition: omOpts.c:13
omBinPage_t * omBinPage
Definition: omStructs.h:16
omBin_t * omBin
Definition: omStructs.h:12
omSpecBin_t * omSpecBin
Definition: omStructs.h:30
omBinPageRegion_t * omBinPageRegion
Definition: omStructs.h:20
#define OM_MAX_BLOCK_SIZE
Definition: omTables.c:31
omBinPage_t om_ZeroPage[]
Definition: om_Alloc.c:19
omSpecBin om_SpecBin
Definition: om_Alloc.c:20
int status int void size_t count int const void size_t count const char int flags
Definition: si_signals.h:73
int status int fd
Definition: si_signals.h:59
#define omPrintAddrInfo(A, B, C)
Definition: xalloc.h:270
#define omPrintUsedAddrs(F, max)
Definition: xalloc.h:268
#define omPrintUsedTrackAddrs(F, max)
Definition: xalloc.h:266