My Project
Loading...
Searching...
No Matches
Macros | Typedefs | Functions | Variables
omDebug.h File Reference

Go to the source code of this file.

Macros

#define omIsTrackAddr(addr)   0
 
#define omIsTrackAddrPage(page)   0
 
#define omIsNormalBinPageAddr(addr)   omIsBinPageAddr(addr)
 
#define omIsBinAddrTrackAddr(addr)   0
 
#define OM_FBIN   1 /* size_bin is bin */
 
#define OM_FSIZE   2 /* size_bin is size */
 
#define OM_FUSED   4 /* is in use, if set */
 
#define OM_FKEPT   8 /* had been freed, if set */
 
#define OM_FSTATIC   16 /* if set, considered to be static, i.e. never be freed */
 
#define OM_FZERO   32 /* for Alloc0 */
 
#define OM_FALIGN   64 /* for AllocAligned */
 
#define OM_FSLOPPY   128 /* be sloppy about arguments */
 
#define OM_FBINADDR   256 /* addr is bin addr */
 
#define OM_FKEEP   512 /* addr is never really freed */
 
#define OM_FMAX   1024 - OM_FBIN - OM_FUSED
 
#define omGetUsedBlocksOfPage(page)   (page->used_blocks)
 
#define omIsStaticTrackAddr(addr)   0
 
#define omCheckReturn(cond)    do {omError_t _status = cond; if (_status) return _status;} while (0)
 
#define omCheckReturnError(cond, error)    do {if (cond) return omReportError(error, report, OM_FLR_VAL, "");} while (0)
 
#define omCheckReturnCorrupted(cond)    omCheckReturnError(cond, omError_MemoryCorrupted)
 
#define omAddrCheckReturn(cond)
 
#define omAddrCheckReturnError(cond, error)    do {if (cond) return omReportAddrError(error, report, addr, bin_size, flags, OM_FLR_VAL, "");} while (0)
 
#define omAddrCheckReturnCorrupted(cond)    omAddrCheckReturnError(cond, omError_MemoryCorrupted)
 

Typedefs

typedef unsigned short omTrackFlags_t
 

Functions

void * _omDebugAlloc (void *size_bin, omTrackFlags_t flags, OM_CTFL_DECL)
 
void * _omDebugRealloc (void *old_addr, void *old_size_bin, void *new_size_bin, omTrackFlags_t old_flags, omTrackFlags_t new_flags, OM_CTFL_DECL)
 
void _omDebugFree (void *addr, void *size_bin, omTrackFlags_t flags, OM_CFL_DECL)
 
void * _omDebugMemDup (void *addr, omTrackFlags_t flags, OM_CTFL_DECL)
 
char * _omDebugStrDup (const char *addr, OM_TFL_DECL)
 
omError_t _omDebugBin (omBin bin, OM_CFL_DECL)
 
omError_t _omDebugMemory (OM_CFL_DECL)
 
omError_t _omDebugAddr (void *addr, void *bin_size, omTrackFlags_t flags, OM_CFL_DECL)
 
void omFreeKeptAddr ()
 
void omPrintUsedAddrs (FILE *fd, int max_frames)
 
void omPrintUsedTrackAddrs (FILE *fd, int max_frames)
 
void omMarkAsStaticAddr (void *addr)
 
void omMarkMemoryAsStatic ()
 
void omUnMarkAsStaticAddr (void *addr)
 
void omUnMarkMemoryAsStatic ()
 
void omFreeKeptAddrFromBin (omBin bin)
 
omError_t omCheckPtr (const void *ptr, omError_t report, OM_FLR_DECL)
 
omError_t _omCheckAddr (void *addr, void *size_bin, omTrackFlags_t flags, char check, omError_t report, OM_FLR_DECL)
 
omError_t omDoCheckBinAddr (void *addr, void *bin_size, omTrackFlags_t flags, char level, omError_t report, OM_FLR_DECL)
 
omError_t _omCheckBin (omBin bin, int normal_bin, char check, omError_t report, OM_FLR_DECL)
 
omError_t _omCheckMemory (char check, omError_t report, OM_FLR_DECL)
 
omError_t omReportAddrError (omError_t error, omError_t report, void *addr, void *bin_size, omTrackFlags_t flags, OM_FLR_DECL, const char *fmt,...)
 
omError_t omDoCheckBin (omBin bin, int normal_bin, char level, omError_t report, OM_FLR_DECL)
 
void omIterateTroughAddrs (int normal, int track, void(*CallBackUsed)(void *), void(*CallBackFree)(void *))
 
void omIterateTroughBinAddrs (omBin bin, void(*CallBackUsed)(void *), void(*CallBackFree)(void *))
 
omError_t omDoCheckAddr (void *addr, void *bin_size, omTrackFlags_t flags, char level, omError_t report, OM_FLR_DECL)
 
int omIsInKeptAddrList (void *addr)
 
void * omAddr_2_OutAddr (void *addr)
 
int omIsKnownMemoryRegion (omBinPageRegion region)
 
omError_t omCheckBinPageRegion (omBinPageRegion region, int level, omError_t report, OM_FLR_DECL)
 
omError_t omCheckBinPageRegions (int level, omError_t report, OM_FLR_DECL)
 
omBinPageRegion omFindRegionOfAddr (void *addr)
 
int omIsAddrOnFreeBinPage (void *addr)
 

Variables

void * om_KeptAddr
 
void * om_LastKeptAddr
 
unsigned long om_MaxAddr
 
unsigned long om_MinAddr
 
void * om_AlwaysKeptAddrs
 

Macro Definition Documentation

◆ OM_FALIGN

#define OM_FALIGN   64 /* for AllocAligned */

Definition at line 38 of file omDebug.h.

◆ OM_FBIN

#define OM_FBIN   1 /* size_bin is bin */

Definition at line 32 of file omDebug.h.

◆ OM_FBINADDR

#define OM_FBINADDR   256 /* addr is bin addr */

Definition at line 40 of file omDebug.h.

◆ OM_FKEEP

#define OM_FKEEP   512 /* addr is never really freed */

Definition at line 41 of file omDebug.h.

◆ OM_FKEPT

#define OM_FKEPT   8 /* had been freed, if set */

Definition at line 35 of file omDebug.h.

◆ OM_FMAX

#define OM_FMAX   1024 - OM_FBIN - OM_FUSED

Definition at line 44 of file omDebug.h.

◆ OM_FSIZE

#define OM_FSIZE   2 /* size_bin is size */

Definition at line 33 of file omDebug.h.

◆ OM_FSLOPPY

#define OM_FSLOPPY   128 /* be sloppy about arguments */

Definition at line 39 of file omDebug.h.

◆ OM_FSTATIC

#define OM_FSTATIC   16 /* if set, considered to be static, i.e. never be freed */

Definition at line 36 of file omDebug.h.

◆ OM_FUSED

#define OM_FUSED   4 /* is in use, if set */

Definition at line 34 of file omDebug.h.

◆ OM_FZERO

#define OM_FZERO   32 /* for Alloc0 */

Definition at line 37 of file omDebug.h.

◆ omAddrCheckReturn

#define omAddrCheckReturn (   cond)
Value:
do \
{ \
omError_t _status = cond; \
if (_status && (_status != omError_MaxError)) \
{ \
_omPrintAddrInfo(stderr, _status, addr, bin_size, flags, 10, " occurred for"); \
return _status; \
} \
} while (0)
@ omError_MaxError
Definition: omError.h:42
enum omError_e omError_t
Definition: omError.h:44
int status int void size_t count int const void size_t count const char int flags
Definition: si_signals.h:73

Definition at line 176 of file omDebug.h.

◆ omAddrCheckReturnCorrupted

#define omAddrCheckReturnCorrupted (   cond)     omAddrCheckReturnError(cond, omError_MemoryCorrupted)

Definition at line 188 of file omDebug.h.

◆ omAddrCheckReturnError

#define omAddrCheckReturnError (   cond,
  error 
)     do {if (cond) return omReportAddrError(error, report, addr, bin_size, flags, OM_FLR_VAL, "");} while (0)

Definition at line 186 of file omDebug.h.

◆ omCheckReturn

#define omCheckReturn (   cond)     do {omError_t _status = cond; if (_status) return _status;} while (0)

Definition at line 170 of file omDebug.h.

◆ omCheckReturnCorrupted

#define omCheckReturnCorrupted (   cond)     omCheckReturnError(cond, omError_MemoryCorrupted)

Definition at line 174 of file omDebug.h.

◆ omCheckReturnError

#define omCheckReturnError (   cond,
  error 
)     do {if (cond) return omReportError(error, report, OM_FLR_VAL, "");} while (0)

Definition at line 172 of file omDebug.h.

◆ omGetUsedBlocksOfPage

#define omGetUsedBlocksOfPage (   page)    (page->used_blocks)

Definition at line 88 of file omDebug.h.

◆ omIsBinAddrTrackAddr

#define omIsBinAddrTrackAddr (   addr)    0

Definition at line 15 of file omDebug.h.

◆ omIsNormalBinPageAddr

#define omIsNormalBinPageAddr (   addr)    omIsBinPageAddr(addr)

Definition at line 14 of file omDebug.h.

◆ omIsStaticTrackAddr

#define omIsStaticTrackAddr (   addr)    0

Definition at line 150 of file omDebug.h.

◆ omIsTrackAddr

#define omIsTrackAddr (   addr)    0

Definition at line 12 of file omDebug.h.

◆ omIsTrackAddrPage

#define omIsTrackAddrPage (   page)    0

Definition at line 13 of file omDebug.h.

Typedef Documentation

◆ omTrackFlags_t

typedef unsigned short omTrackFlags_t

Definition at line 45 of file omDebug.h.

Function Documentation

◆ _omCheckAddr()

omError_t _omCheckAddr ( void *  addr,
void *  size_bin,
omTrackFlags_t  flags,
char  check,
omError_t  report,
OM_FLR_DECL   
)

Definition at line 36 of file omDebugCheck.c.

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}
VAR int check
Definition: libparse.cc:1106
#define omGetBinOfAddr(addr)
#define omIsBinPageAddr(addr)
Definition: omBinPage.h:68
omError_t omDoCheckAddr(void *addr, void *bin_size, omTrackFlags_t flags, char level, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:146
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
#define omIsBinAddrTrackAddr(addr)
Definition: omDebug.h:15
#define omCheckReturn(cond)
Definition: omDebug.h:170
@ omError_MemoryCorrupted
Definition: omError.h:21
@ omError_NoError
Definition: omError.h:18

◆ _omCheckBin()

omError_t _omCheckBin ( omBin  bin,
int  normal_bin,
char  check,
omError_t  report,
OM_FLR_DECL   
)

Definition at line 49 of file omDebugCheck.c.

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}

◆ _omCheckMemory()

omError_t _omCheckMemory ( char  check,
omError_t  report,
OM_FLR_DECL   
)

Definition at line 58 of file omDebugCheck.c.

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}
int i
Definition: cfEzgcd.cc:132
ListNode * next
Definition: janet.h:31
omBin om_StickyBins
Definition: omBin.c:374
omBin_t om_StaticBin[]
omError_t omCheckBinPageRegions(int level, omError_t report, OM_FLR_DECL)
Definition: omBinPage.c:531
void * om_AlwaysKeptAddrs
Definition: omDebug.c:31
void * om_KeptAddr
Definition: omDebug.c:28
#define OM_FKEPT
Definition: omDebug.h:35
@ omError_KeptAddrListCorrupted
Definition: omError.h:36
#define NULL
Definition: omList.c:12
#define omCheckGList(ptr, next, level, report, OM_FLR_VAL)
Definition: omList.h:115
#define omCheckList(ptr, level, report, OM_FLR_VAL)
Definition: omList.h:83
omBin_t * omBin
Definition: omStructs.h:12
omSpecBin_t * omSpecBin
Definition: omStructs.h:30
omSpecBin om_SpecBin
Definition: om_Alloc.c:20

◆ _omDebugAddr()

omError_t _omDebugAddr ( void *  addr,
void *  bin_size,
omTrackFlags_t  flags,
OM_CFL_DECL   
)

Definition at line 278 of file omDebug.c.

279{
280 OM_R_DEF;
281 check = MAX(check,om_Opts.MinCheck);
282 check = MIN(check,om_Opts.MaxCheck);
283 return _omCheckAddr(addr, bin_size,
285}
#define MIN(a, b)
Definition: omDebug.c:102
#define MAX(a, b)
Definition: omDebug.c:100
omError_t _omCheckAddr(void *addr, void *size_bin, omTrackFlags_t flags, char check, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:36
#define OM_FUSED
Definition: omDebug.h:34
omOpts_t om_Opts
Definition: omOpts.c:13

◆ _omDebugAlloc()

void * _omDebugAlloc ( void *  size_bin,
omTrackFlags_t  flags,
OM_CTFL_DECL   
)

Definition at line 110 of file omDebug.c.

111{
112 void* addr;
113 OM_R_DEF;
114 check = MAX(check, om_Opts.MinCheck);
115 track = MAX(track, om_Opts.MinTrack);
116 check = MIN(check, om_Opts.MaxCheck);
117 track = MIN(track, om_Opts.MaxTrack);
118
119 if (check)
120 {
121 if (check > 1)
122 {
123 if (flags & OM_FBIN)
124 (void) _omCheckBin((omBin)size_bin, 1, check-1, omError_MemoryCorrupted, OM_FLR_VAL);
125 else if (check > 2)
126 {
128 (void) _omCheckMemory(check-2, omError_MemoryCorrupted, OM_FLR_VAL);
129 }
130 }
131 if (size_bin == NULL && ! (flags & OM_FSLOPPY))
132 {
134 }
135 }
136
137 addr = __omDebugAlloc(size_bin, flags, track, OM_FLR_VAL);
138
139#ifdef OM_INTERNAL_DEBUG
140 (void) _omCheckAddr(addr, size_bin,flags|OM_FUSED,check, omError_InternalBug, OM_FLR);
141#endif
142
143 return addr;
144}
static void * __omDebugAlloc(void *size_bin, omTrackFlags_t flags, char track, OM_FLR_DECL)
Definition: omDebug.c:304
#define OM_FSLOPPY
Definition: omDebug.h:39
omError_t _omCheckBin(omBin bin, int normal_bin, char check, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:49
#define OM_FSIZE
Definition: omDebug.h:33
omError_t _omCheckMemory(char check, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:58
#define OM_FBIN
Definition: omDebug.h:32
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_NullSizeAlloc
Definition: omError.h:33
@ omError_InternalBug
Definition: omError.h:20

◆ _omDebugBin()

omError_t _omDebugBin ( omBin  bin,
OM_CFL_DECL   
)

Definition at line 293 of file omDebug.c.

294{
295 OM_R_DEF;
296 return _omCheckBin(bin, 1, MAX(check, om_Opts.MinCheck), omError_NoError,OM_FLR_VAL);
297}

◆ _omDebugFree()

void _omDebugFree ( void *  addr,
void *  size_bin,
omTrackFlags_t  flags,
OM_CFL_DECL   
)

Definition at line 182 of file omDebug.c.

184{
185 OM_R_DEF;
186 check = MAX(check, om_Opts.MinCheck);
187 check = MIN(check, om_Opts.MaxCheck);
188
189 if (check && _omCheckAddr(addr, size_bin, flags|OM_FUSED, check, omError_NoError, OM_FLR_VAL)) return;
190
191 __omDebugFree(addr,size_bin,flags, OM_FLR_VAL);
192
193#ifdef OM_INTERNAL_DEBUG
194 if (flags & OM_FBIN)
195 (void) _omCheckBin((omBin)size_bin, 1, check-1,omError_InternalBug, OM_FLR);
196 else
198#endif
199}
static void __omDebugFree(void *addr, void *size_bin, omTrackFlags_t flags, OM_FLR_DECL)
Definition: omDebug.c:465

◆ _omDebugMemDup()

void * _omDebugMemDup ( void *  addr,
omTrackFlags_t  flags,
OM_CTFL_DECL   
)

Definition at line 201 of file omDebug.c.

202{
203 void* ret;
204 size_t sizeW;
205 OM_R_DEF;
206
207 check = MAX(check, om_Opts.MinCheck);
208 track = MAX(track, om_Opts.MinTrack);
209 check = MIN(check, om_Opts.MaxCheck);
210 track = MIN(track, om_Opts.MaxTrack);
211
212 if (check & _omCheckAddr(addr, 0, OM_FUSED, check, omError_NoError, OM_FLR_VAL))
213 {
214 return NULL;
215 }
216 else
217 {
218 sizeW = omSizeWOfAddr(addr);
219 }
220
221 ret = __omDebugAlloc((void*) (sizeW << LOG_SIZEOF_LONG), OM_FSIZE | flags, track, OM_FLR_VAL);
222 omMemcpyW(ret, addr, sizeW);
223
224#ifdef OM_INTERNAL_DEBUG
225 (void) _omCheckAddr(ret, (void*) (sizeW << LOG_SIZEOF_LONG),OM_FUSED|OM_FSIZE,
226 check, omError_InternalBug, OM_FLR);
227#endif
228 return ret;
229}
#define omMemcpyW(p1, p2, l)
Definition: omMemOps.h:29
#define omSizeWOfAddr(P)
Definition: xalloc.h:223

◆ _omDebugMemory()

omError_t _omDebugMemory ( OM_CFL_DECL  )

Definition at line 286 of file omDebug.c.

287{
288 OM_R_DEF;
289 check = MAX(check,om_Opts.MinCheck);
290 check = MIN(check,om_Opts.MaxCheck);
291 return _omCheckMemory(check, omError_NoError,OM_FLR_VAL);
292}

◆ _omDebugRealloc()

void * _omDebugRealloc ( void *  old_addr,
void *  old_size_bin,
void *  new_size_bin,
omTrackFlags_t  old_flags,
omTrackFlags_t  new_flags,
OM_CTFL_DECL   
)

Definition at line 147 of file omDebug.c.

149{
150 void* new_addr = NULL;
152 OM_R_DEF;
153 check = MAX(check, om_Opts.MinCheck);
154 track = MAX(track, om_Opts.MinTrack);
155 check = MIN(check, om_Opts.MaxCheck);
156 track = MIN(track, om_Opts.MaxTrack);
157
158 if (check)
159 {
160 status = _omCheckAddr(old_addr, old_size_bin, old_flags|OM_FUSED, check, omError_NoError, OM_FLR_VAL);
161
162 if (status == omError_NoError && check > 1 && new_flags & OM_FBIN)
163 status = omDoCheckBin((omBin)new_size_bin, 1, check-1, omError_MemoryCorrupted, OM_FLR_VAL);
164
165 if (new_size_bin == NULL && !(new_flags & OM_FSLOPPY))
166 {
168 new_size_bin = (void*) 1;
169 }
170 }
171
172 new_addr = __omDebugRealloc(old_addr, old_size_bin, new_size_bin,
173 status, old_flags, new_flags, track, OM_FLR_VAL);
174#ifdef OM_INTERNAL_DEBUG
175 if (status == omError_NoError)
176 (void) _omCheckAddr(new_addr, new_size_bin,new_flags|OM_FUSED,check, omError_InternalBug, OM_FLR);
177#endif
178
179 return new_addr;
180}
static void * __omDebugRealloc(void *old_addr, void *old_size_bin, void *new_size_bin, omError_t old_status, omTrackFlags_t old_flags, omTrackFlags_t new_flags, char track, OM_FLR_DECL)
Definition: omDebug.c:352
omError_t omDoCheckBin(omBin bin, int normal_bin, char level, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:253
int * status
Definition: si_signals.h:51

◆ _omDebugStrDup()

char * _omDebugStrDup ( const char *  addr,
OM_TFL_DECL   
)

Definition at line 231 of file omDebug.c.

232{
233#if 0
234 unsigned long size;
235#endif
236 unsigned long i=0;
237 char* ret;
238 OM_R_DEF;
239
240 if (addr == NULL)
241 {
242 omReportAddrError(omError_NotString, omError_NoError, (char *)addr, 0, 0, OM_FLR_VAL, "NULL String");
243 return NULL;
244 }
245 track = MAX(track, om_Opts.MinTrack);
246 track = MIN(track, om_Opts.MaxTrack);
247
248#if 0
249 // this breaks if SizeOfAddr(addr) > PAGESIZE
250 if (omIsBinPageAddr(addr))
251 {
252 size = omSizeOfAddr(addr);
253 }
254 else
255 {
256 size = ULONG_MAX;
257 }
258#endif
259 while ((addr[i] != '\0') /* && (i < size)*/) i++;
260// there seems to be no way to check if it is really a string
261#if 0
262 if (i == size)
263 {
264 omReportAddrError(omError_NotString, omError_NoError, addr, 0, 0, OM_FLR_VAL, "Not 0 terminated");
265 i = size-1;
266 }
267#endif
268 ret = __omDebugAlloc((char*)i+1, OM_FSIZE, track, OM_FLR_VAL);
269 memcpy(ret, addr, i);
270 ret[i] = '\0';
271
272#ifdef OM_INTERNAL_DEBUG
273 (void) _omCheckAddr(ret, (void*)i+1,OM_FUSED|OM_FSIZE,om_Opts.MinCheck, omError_InternalBug, OM_FLR);
274#endif
275 return ret;
276}
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600
size_t omSizeOfAddr(const void *addr)
omError_t omReportAddrError(omError_t error, omError_t report, void *addr, void *bin_size, omTrackFlags_t flags, OM_FLR_DECL, const char *fmt,...)
Definition: omDebugCheck.c:394
@ omError_NotString
Definition: omError.h:40

◆ omAddr_2_OutAddr()

void * omAddr_2_OutAddr ( void *  addr)

◆ omCheckBinPageRegion()

omError_t omCheckBinPageRegion ( omBinPageRegion  region,
int  level,
omError_t  report,
OM_FLR_DECL   
)

Definition at line 505 of file omBinPage.c.

506{
507 if (level <= 0) return omError_NoError;
508
509 omCheckReturn(omCheckPtr(region, report, OM_FLR_VAL));
511 omCheckReturnCorrupted(! omIsAddrPageAligned(region->addr) || ! omIsAddrPageAligned(region->current));
512 omCheckReturnCorrupted(region->used_pages < 0);
513 omCheckReturnCorrupted(region->init_pages < 0 || region->init_pages > region->pages);
514
515 if (region->init_pages)
516 {
517 omCheckReturnCorrupted(! omIsAddrPageAligned(region->init_addr));
518 omCheckReturnCorrupted(! (region->init_addr >= region->addr
519 && region->init_addr <= region->addr + (region->pages -1)*SIZEOF_SYSTEM_PAGE));
520 omCheckReturnCorrupted(region->init_addr !=
521 region->addr + (region->pages - region->init_pages)*SIZEOF_SYSTEM_PAGE);
522 }
523
524 omCheckReturn(omCheckList(region->current, level, report, OM_FLR_VAL));
525 omCheckReturnCorrupted(region->current == NULL && region->used_pages + region->init_pages != region->pages);
527 omListLength(region->current)+region->used_pages+region->init_pages != region->pages);
528 return omError_NoError;
529}
int level(const CanonicalForm &f)
int omIsKnownMemoryRegion(omBinPageRegion region)
Definition: omBinPage.c:489
#define omIsAddrPageAligned(addr)
Definition: omBinPage.h:16
omError_t omCheckPtr(const void *ptr, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:136
#define omCheckReturnCorrupted(cond)
Definition: omDebug.h:174
#define omListLength(ptr)
Definition: omList.h:62

◆ omCheckBinPageRegions()

omError_t omCheckBinPageRegions ( int  level,
omError_t  report,
OM_FLR_DECL   
)

Definition at line 531 of file omBinPage.c.

532{
534
535 if (level <= 0) return omError_NoError;
536 if (iter == NULL) return omError_NoError;
537
542
543
544 if (level > 1)
545 {
548
549 omCheckReturn(omCheckGList(iter, next, level, report, OM_FLR_VAL));
550 omCheckReturn(omCheckGList(iter, prev, level, report, OM_FLR_VAL));
551
553 !=
554 omGListLength(next_last, prev));
555
557
559 while (iter)
560 {
562
563 omCheckReturn(omCheckBinPageRegion(iter, level - 1, report, OM_FLR_VAL));
564 iter = iter->next;
565 }
566
568 while (iter)
569 {
571 omCheckReturn(omCheckBinPageRegion(iter, level - 1, report, OM_FLR_VAL));
572 iter = iter->prev;
573 }
574 }
575 return omError_NoError;
576}
CFFListIterator iter
Definition: facAbsBiFact.cc:53
#define OM_IS_EMPTY_REGION(region)
Definition: omBinPage.c:96
static omBinPageRegion om_CurrentBinPageRegion
Definition: omBinPage.c:35
omError_t omCheckBinPageRegion(omBinPageRegion region, int level, omError_t report, OM_FLR_DECL)
Definition: omBinPage.c:505
#define omCheckReturnError(cond, error)
Definition: omDebug.h:172
#define omGListLength(ptr, next)
Definition: omList.h:94
#define omGListLast(ptr, next)
Definition: omList.h:96
omBinPageRegion_t * omBinPageRegion
Definition: omStructs.h:20

◆ omCheckPtr()

omError_t omCheckPtr ( const void *  ptr,
omError_t  report,
OM_FLR_DECL   
)

Definition at line 136 of file omDebugCheck.c.

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}
unsigned long om_MaxAddr
Definition: omDebugCheck.c:19
unsigned long om_MinAddr
Definition: omDebugCheck.c:20
@ omError_NullAddr
Definition: omError.h:22
@ omError_UnalignedAddr
Definition: omError.h:32
@ omError_InvalidRangeAddr
Definition: omError.h:23

◆ omDoCheckAddr()

omError_t omDoCheckAddr ( void *  addr,
void *  bin_size,
omTrackFlags_t  flags,
char  level,
omError_t  report,
OM_FLR_DECL   
)

Definition at line 146 of file omDebugCheck.c.

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}
#define omIsKnownTopBin(bin, normal_bin)
Definition: omBin.h:55
static omError_t omDoCheckLargeAddr(void *addr, void *bin_size, omTrackFlags_t flags, char level, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:179
omError_t omCheckPtr(const void *ptr, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:136
omError_t omDoCheckBinAddr(void *addr, void *bin_size, omTrackFlags_t flags, char level, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:198
#define OM_FALIGN
Definition: omDebug.h:38
#define omAddrCheckReturnError(cond, error)
Definition: omDebug.h:186
#define omAddrCheckReturn(cond)
Definition: omDebug.h:176
@ omError_UnknownBin
Definition: omError.h:30

◆ omDoCheckBin()

omError_t omDoCheckBin ( omBin  bin,
int  normal_bin,
char  level,
omError_t  report,
OM_FLR_DECL   
)

Definition at line 253 of file omDebugCheck.c.

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}
#define omGetTopBinOfPage(page)
#define omGetStickyOfPage(page)
#define omIsStickyBin(bin)
Definition: omBin.h:33
static omError_t omDoCheckBinPage(omBinPage page, int normal_page, int level, omError_t report, OM_FLR_DECL)
Definition: omDebugCheck.c:336
#define omGetUsedBlocksOfPage(page)
Definition: omDebug.h:88
OM_INLINE_DECL omBin omGetBinOfPage(omBinPage page)
#define omFindInGList(ptr, next, what, value)
Definition: omList.h:104
#define omIsOnGList(ptr, next, addr)
Definition: omList.h:100
omBinPage_t * omBinPage
Definition: omStructs.h:16
omBinPage_t om_ZeroPage[]
Definition: om_Alloc.c:19

◆ omDoCheckBinAddr()

omError_t omDoCheckBinAddr ( void *  addr,
void *  bin_size,
omTrackFlags_t  flags,
char  level,
omError_t  report,
OM_FLR_DECL   
)

Definition at line 198 of file omDebugCheck.c.

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}
#define omGetTopBinOfAddr(addr)
#define SIZEOF_OM_BIN_PAGE_HEADER
omBinPageRegion omFindRegionOfAddr(void *addr)
Definition: omBinPage.c:578
int omIsAddrOnFreeBinPage(void *addr)
Definition: omBinPage.c:595
#define omGetBinPageOfAddr(addr)
Definition: omBinPage.h:22
#define OM_FBINADDR
Definition: omDebug.h:40
#define omAddrCheckReturnCorrupted(cond)
Definition: omDebug.h:188
int omIsInKeptAddrList(void *addr)
Definition: omDebugTrack.c:743
@ omError_WrongSize
Definition: omError.h:26
@ omError_FreedAddr
Definition: omError.h:27
@ omError_FreedAddrOrMemoryCorrupted
Definition: omError.h:28
@ omError_FalseAddr
Definition: omError.h:24
@ omError_WrongBin
Definition: omError.h:29
#define omIsOnList(ptr, addr)
Definition: omList.h:68

◆ omFindRegionOfAddr()

omBinPageRegion omFindRegionOfAddr ( void *  addr)

Definition at line 578 of file omBinPage.c.

579{
581
582 if (region == NULL) return 0;
583 region = omGListLast(region, prev);
584 do
585 {
586 if ((char *)addr >= region->addr
587 && (char *)addr < region->addr + (region->pages)*SIZEOF_SYSTEM_PAGE)
588 return region;
589 region = region->next;
590 }
591 while (region != NULL);
592 return NULL;
593}

◆ omFreeKeptAddr()

void omFreeKeptAddr ( )

Definition at line 609 of file omDebug.c.

610{
611 void* next;
612 omBin bin;
614 void* addr = om_KeptAddr;
615
616 if (om_LastKeptAddr != NULL)
618
623
624 while (addr != NULL)
625 {
626 next = *((void**)addr);
627 bin = omGetOrigSpecBinOfAddr(addr);
628
629#ifdef OM_HAVE_TRACK
630 if (omIsTrackAddr(addr))
631 {
632 omMarkAsFreeTrackAddr(addr, 0, &flags, OM_FLR);
633 omFreeTrackAddr(addr);
634 }
635 else
636#endif
637 __omFree(addr);
638
639 addr = next;
640 if (bin != NULL) omUnGetSpecBin(&bin);
641 }
642}
#define __omFree(addr)
#define omUnGetSpecBin(bin_ptr)
Definition: omBin.h:14
static omBin omGetOrigSpecBinOfAddr(void *addr)
Definition: omDebug.c:449
static unsigned long om_NumberOfKeptAddrs
Definition: omDebug.c:29
void * om_LastKeptAddr
Definition: omDebug.c:30
unsigned short omTrackFlags_t
Definition: omDebug.h:45
#define omIsTrackAddr(addr)
Definition: omDebug.h:12

◆ omFreeKeptAddrFromBin()

void omFreeKeptAddrFromBin ( omBin  bin)

Definition at line 542 of file omDebug.c.

543{
544 void* addr = om_KeptAddr;
545 void* prev_addr = NULL;
546 void* next_addr;
548
549 while (addr != NULL)
550 {
551 next_addr = *((void**) addr);
552 if (omIsBinPageAddr(addr) && omGetTopBinOfAddr(addr) == bin)
553 {
554 if (prev_addr != NULL)
555 *((void**) prev_addr) = next_addr;
556 else
557 om_KeptAddr = next_addr;
558 if (addr == om_LastKeptAddr)
559 om_LastKeptAddr = prev_addr;
561#ifdef OM_HAVE_TRACK
562 if (omIsTrackAddr(addr))
563 {
564 omMarkAsFreeTrackAddr(addr, 0, &flags, OM_FLR);
565 omFreeTrackAddr(addr);
566 }
567 else
568#endif
569 __omFree(addr);
570 addr = next_addr;
571 }
572 else
573 {
574 prev_addr = addr;
575 addr = next_addr;
576 }
577 }
578
579 addr = om_AlwaysKeptAddrs;
580 prev_addr = NULL;
581 while (addr != NULL)
582 {
583 next_addr = *((void**) addr);
584 if (omIsBinPageAddr(addr) && omGetTopBinOfAddr(addr) == bin)
585 {
586 if (prev_addr != NULL)
587 *((void**) prev_addr) = next_addr;
588 else
589 om_AlwaysKeptAddrs = next_addr;
590#ifdef OM_HAVE_TRACK
591 if (omIsTrackAddr(addr))
592 {
593 omMarkAsFreeTrackAddr(addr, 0, &flags, OM_FLR);
594 omFreeTrackAddr(addr);
595 }
596 else
597#endif
598 __omFree(addr);
599 addr = next_addr;
600 }
601 else
602 {
603 prev_addr = addr;
604 addr = next_addr;
605 }
606 }
607}

◆ omIsAddrOnFreeBinPage()

int omIsAddrOnFreeBinPage ( void *  addr)

Definition at line 595 of file omBinPage.c.

596{
597 char *c_addr=(char *)addr;
599
600 if (region == NULL) return 0;
601 do
602 {
603 if (c_addr > region->addr && c_addr < region->addr + (region->pages)*SIZEOF_SYSTEM_PAGE)
604 {
605 if (omIsOnList(region->current, omGetPageOfAddr(addr))) return 1;
606 return 0;
607 }
608 region = region->next;
609 }
610 while (region != NULL);
611 return 0;
612}
#define omGetPageOfAddr(addr)
Definition: omBinPage.h:19

◆ omIsInKeptAddrList()

int omIsInKeptAddrList ( void *  addr)

Definition at line 743 of file omDebugTrack.c.

744{
745 void* ptr = om_KeptAddr;
746 int ret = 0;
747
748#ifdef OM_HAVE_TRACK
749 if (omIsTrackAddr(addr))
750 addr = omOutAddr_2_TrackAddr(addr);
751#endif
752
753 if (om_LastKeptAddr != NULL)
755
756 while (ptr != NULL)
757 {
758 if (ptr == addr)
759 {
760 ret = 1; break;
761 }
762 ptr = *((void**) ptr);
763 }
764
765 if (om_LastKeptAddr != NULL)
766 *((void**) om_LastKeptAddr) = NULL;
767
768 return ret;
769}

◆ omIsKnownMemoryRegion()

int omIsKnownMemoryRegion ( omBinPageRegion  region)

Definition at line 489 of file omBinPage.c.

490{
492
493 if (region == NULL || iter == NULL) return 0;
495 do
496 {
497 if (region == iter) return 1;
498 iter = iter->next;
499 }
500 while (iter != NULL);
501 return 0;
502}

◆ omIterateTroughAddrs()

void omIterateTroughAddrs ( int  normal,
int  track,
void(*)(void *)  CallBackUsed,
void(*)(void *)  CallBackFree 
)

Definition at line 503 of file omDebugCheck.c.

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}
void omIterateTroughBinAddrs(omBin bin, void(*CallBackUsed)(void *), void(*CallBackFree)(void *))
Definition: omDebugCheck.c:464

◆ omIterateTroughBinAddrs()

void omIterateTroughBinAddrs ( omBin  bin,
void(*)(void *)  CallBackUsed,
void(*)(void *)  CallBackFree 
)

Definition at line 464 of file omDebugCheck.c.

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}

◆ omMarkAsStaticAddr()

void omMarkAsStaticAddr ( void *  addr)

◆ omMarkMemoryAsStatic()

void omMarkMemoryAsStatic ( )

◆ omPrintUsedAddrs()

void omPrintUsedAddrs ( FILE *  fd,
int  max_frames 
)

Definition at line 565 of file omDebugCheck.c.

566{
569 om_print_used_addr_fd = (fd == NULL ? stdout : fd);
572 fprintf(fd, "UsedAddrs Summary: UsedBlocks:%ld TotalSize:%ld\n",
574}
static int max(int a, int b)
Definition: fast_mult.cc:264
static FILE * om_print_used_addr_fd
Definition: omDebugCheck.c:546
static void _omPrintUsedAddr(void *addr)
Definition: omDebugCheck.c:551
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
int status int fd
Definition: si_signals.h:59

◆ omPrintUsedTrackAddrs()

void omPrintUsedTrackAddrs ( FILE *  fd,
int  max_frames 
)

Definition at line 576 of file omDebugCheck.c.

577{
580 om_print_used_addr_fd = (fd == NULL ? stdout : fd);
583 fprintf(fd, "UsedTrackAddrs Summary: UsedBlocks:%ld TotalSize:%ld\n",
585}

◆ omReportAddrError()

omError_t omReportAddrError ( omError_t  error,
omError_t  report,
void *  addr,
void *  bin_size,
omTrackFlags_t  flags,
OM_FLR_DECL  ,
const char *  fmt,
  ... 
)

Definition at line 394 of file omDebugCheck.c.

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}
#define error(a)
Definition: mpr_numeric.cc:966
Definition: ap.h:40
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
omError_t om_ErrorStatus
Definition: omError.c:13
int om_CallErrorHook
Definition: omError.c:77
@ omError_NotBinAddr
Definition: omError.h:31

◆ omUnMarkAsStaticAddr()

void omUnMarkAsStaticAddr ( void *  addr)

◆ omUnMarkMemoryAsStatic()

void omUnMarkMemoryAsStatic ( )

Variable Documentation

◆ om_AlwaysKeptAddrs

void* om_AlwaysKeptAddrs
extern

Definition at line 31 of file omDebug.c.

◆ om_KeptAddr

void* om_KeptAddr
extern

Definition at line 28 of file omDebug.c.

◆ om_LastKeptAddr

void* om_LastKeptAddr
extern

Definition at line 30 of file omDebug.c.

◆ om_MaxAddr

unsigned long om_MaxAddr
extern

Definition at line 19 of file omDebugCheck.c.

◆ om_MinAddr

unsigned long om_MinAddr
extern

Definition at line 20 of file omDebugCheck.c.