38{
39#ifndef OM_NDEBUG
43 int missed = 0, alloc;
45
46 printf("omtTestErrors: Start\n");
49 {
53 memset(&spec, 0,
sizeof(
struct LongSpec));
55 alloc = 0;
57 {
59 {
63 {
67 bin->last_page =
NULL;
69 bin->last_page = last_page;
70 }
71 else printf("cell not found\n");
72 break;
73 }
74
76 {
78 break;
79 }
80
82 {
84 break;
85 }
86
88 {
89 spec.MinSize = 8;
91 spec.NoTrack = 1;
94 {
96 }
97 else printf("cell not found\n");
98 break;
99 }
100
102 {
103 spec.MinSize = 8;
104 spec.MinTrack = 3;
107 {
109 }
110 else printf("cell not found\n");
111 break;
112 }
113
115 {
119 {
122 {
124 spec.MaxSize = 0;
125 spec.MinTrack = 3;
126 spec.NotIsBin = 1;
127 spec.MinSize = 2;
130 {
133 {
136 spec.MinTrack = 0;
137 spec.NotIsBin = 0;
141 else printf("cell not found");
142 }
143 }
144 else printf("cell not found\n");
145 }
146 }
147 else printf("cell not found\n");
148 break;
149 }
150
152 {
153#if KEEP_LEVEL > 0
156 {
157 addr = *((void**) addr);
158 }
160 {
163 {
167 {
168 addr = *((void**) addr);
169 }
171 {
174 }
175 }
176 }
178 {
179 printf("addr not found\n");
180 break;
181 }
183 break;
184#endif
185 spec.MinTrack = 5;
186 spec.NotIsBin = 1;
189 {
192 alloc = 1;
194 }
195 else printf("cell not found\n");
196 break;
197 }
198
200 {
202 spec.NoTrack = 1;
205 {
212 page->region = region;
213 }
214 else printf("cell not found\n");
215 break;
216 }
217
219 {
220 spec.MaxSize = 32;
221 spec.NoTrack = 1;
224 {
226 }
227 else printf("cell not found\n");
228 break;
229 }
230
232 {
236 {
238 }
239 else printf("cell not found\n");
240 break;
241 }
242
244 {
245 spec.NotIsBin = 1;
249 {
251 }
252 else printf("cell not found");
253 break;
254 }
255
257 {
260 {
262 }
263 else printf("cell not found\n");
264 break;
265 }
266
268 {
272 break;
273 }
274
276 {
279 {
283 } else printf("last == NULL\n");
284 break;
285 }
286
288 {
290 {
295 } else printf("om_SpecBin->next == NULL\n");
296 break;
297 }
298
300 {
302 {
309 }
310 else printf("om_KeptAddr == NULL\n");
311 break;
312 }
313
315 {
317 {
318 spec.MinTrack=3;
319 spec.NotIsBin = 1;
322 {
323 void* value;
325 value = *((void**) cell->addr);
326 *((void**) cell->addr) = value -1;
328 *((void**) cell->addr) = value;
329 alloc = 1;
331 }
332 else printf("cell not found\n");
333 }
334 else printf("om_Opts.Keep == 0");
335 break;
336 }
337
339 {
340 spec.MinTrack = 3;
341 spec.NotIsBin = 1;
344 {
346 void* value = *((void**) addr);
347 *((void**) addr) = value -1;
349 *((void**) addr) = value;
350 }
351 else printf("cell not found\n");
352 break;
353 }
354
356 {
357 spec.MinTrack=3;
360 {
361 void* addr = cell->addr - SIZEOF_VOIDP;
362 void* value = *((void**) addr);
363 *((void**) addr) = value -1;
365 *((void**) addr) = value;
366 }
367 else printf("cell not found\n");
368 break;
369 }
370
372 {
373
374#if 0
378 {
379 char* addr = (char*) cell->addr;
386 }
387 else printf("cell not found\n");
388 break;
389#endif
391 break;
392 }
393
395 {
397 break;
398 }
399
400 default:
401 printf("No Error test implemented\n");
402 }
403
405 {
407 missed++;
408 }
409 else
410 {
412 }
413
416 {
419 }
420 else
421 {
423 }
425 {
426 printf("omtTest panik: memory corrupted\n\n");
427 return -1;
428 }
429 printf("\n");
430 }
431 printf("omtTestErrors: Summary: missed = %d\n\n", missed);
433 return missed;
434#else
435 return 0;
436#endif
437}
const CanonicalForm int s
#define omDebugBinAddrSize(addr, size)
#define omDebugAddr(addr)
#define omDebugBinAddr(addr)
#define omRealloc(addr, size)
#define omDebugAddrSize(addr, size)
#define omDebugAddrBin(addr, bin)
#define omGetTopBinOfAddr(addr)
size_t omSizeOfAddr(const void *addr)
#define omGetBinPageOfAddr(addr)
void * om_AlwaysKeptAddrs
void * omAddr_2_OutAddr(void *addr)
#define omIsTrackAddr(addr)
const char * omError2Serror(omError_t error)
omError_t om_InternalErrorStatus
@ omError_MemoryCorrupted
@ omError_FreedAddrOrMemoryCorrupted
@ omError_SortedListError
@ omError_KeptAddrListCorrupted
@ omError_InvalidRangeAddr
@ omError_FalseAddrOrMemoryCorrupted
#define omCheckSortedList(ptr, what, level, report, OM_FLR_VAL)
#define omCheckList(ptr, level, report, OM_FLR_VAL)
omBinPageRegion_t * omBinPageRegion
#define OM_MAX_BLOCK_SIZE
omMemCell omFindCell(struct LongSpec spec)
void TestAlloc(omMemCell cell, unsigned long spec)
void omtTestDebug(omMemCell cell)
void InitCellAddrContent(omMemCell cell)
#define omMergeStickyBinIntoBin(A, B)