17#define MAX_CELLS 100000
20#define END_CHECK_LEVEL 5
35extern omMemCell_t
cells[];
41#define myprintf(format, args...) \
42 printf(format, ## args)
43#define myfflush(what) fflush(what)
45#define myprintf(format, args...) do {} while (0)
46#define myfflush(what) do {} while (0)
49#define IS_STICKY_BIN(spec) (spec & 1)
51#define GET_SIZE(spec) OM_ALIGN_SIZE((spec & ((((unsigned long) 1) << 14) -1)))
52#define SET_SIZE(spec, size) spec = ((spec & ~((((unsigned long) 1) << 14) -1)) | (size))
53#define IS_ALIGNED(spec) (spec & (((unsigned long) 1) << 15))
54#define IS_ZERO(spec) (spec & (((unsigned long) 1) << 16))
55#define IS_BIN(spec) (spec & (((unsigned long) 1) << 17))
56#define IS_SPEC_BIN(spec) (spec & (((unsigned long) 1) << 18))
57#define IS_INLINE(spec) (spec & (((unsigned long) 1) << 19))
58#define DO_FREE(spec) (!(spec & (((unsigned long) 1) << 20)) && !(spec & (((unsigned long) 1) << 21)))
59#define DO_REALLOC(spec) ((spec & (((unsigned long) 1) << 20)) && (spec & (((unsigned long) 1) << 21)))
60#define DO_DUP(spec) ((spec & (((unsigned long) 1) << 20)) && ! (spec & (((unsigned long) 1) << 21)))
63#define DO_CHECK(spec) (spec & (((unsigned long) 1) << 22))
64#define DO_FREE_CHECK(spec) (spec & (((unsigned long) 1) << 23))
66#define DO_CHECK(spec) 0
67#define DO_FREE_CHECK(spec) 0
69#if CHECK_LEVEL > 0 && TRACK_LEVEL > 0
70#define DO_TRACK(spec) (spec & (((unsigned long) 1) << 24))
71#define GET_TRACK(spec) (((spec & ((((unsigned long) 1) << 27) | (((unsigned long) 1) << 26) | (((unsigned long) 1) << 25))) >> 25) % 5) + TRACK_LEVEL
75#define DO_TRACK(spec) 0
76#define GET_TRACK(spec) 0
79#define DO_KEEP(spec) (DO_CHECK(spec) && (spec % KEEP_LEVEL == 0))
80#define DO_FREE_KEEP(spec) (DO_FREE_CHECK(spec) && (spec % KEEP_LEVEL == 0))
82#define DO_KEEP(spec) 0
83#define DO_FREE_KEEP(spec) 0
86#define IS_FREE_SIZE(spec) (spec & (((unsigned long) 1) << 28))
87#define IS_FREE_BIN(spec) (spec & (((unsigned long) 1) << 29))
88#define IS_SLOPPY(spec) (spec & (((unsigned long) 1) << 30))
89#define IS_FREE_BINADDR(spec) (spec & (((unsigned long) 1) << 31))
92#define SPEC_MAX ULONG_MAX
93#define SIZE_MAX ((((unsigned long) 1) << 14) -1)
94#define RANGE_MIN (((unsigned long) 1) << 6)
95#define RANGE_MAX (((unsigned long) 1) << 14)
97#define PAGES_PER_REGION 128
123#define omtTestDebug(cell) do {} while (0)
124#define TestAddrContent(a,v,s) do {} while (0)
125#define TestAddrContentEqual(s1, s2, s) do {} while (0)
void TestAlloc(omMemCell cell, unsigned long spec)
void TestAddrContent(void *addr, unsigned long value, size_t size)
void omtTestAlloc(omMemCell cell, unsigned long spec)
omBin omtGetStickyBin(omBin bin)
void omtTestReallocDebug(omMemCell cell, unsigned long spec)
void omtTestAllocKeep(omMemCell cell, unsigned long spec)
void omtTestDup(omMemCell cell, unsigned long spec)
void omtTestReallocKeep(omMemCell cell, unsigned long spec)
void TestFree(omMemCell cell)
void TestRealloc(omMemCell cell, unsigned long spec)
void omtTestAllocDebug(omMemCell cell, unsigned long spec)
void omtTestDebug(omMemCell cell)
void omtTestFreeDebug(omMemCell cell)
void omtTestRealloc(omMemCell cell, unsigned long spec)
void InitCellAddrContent(omMemCell cell)
void omtTestFree(omMemCell cell)
void omtTestDupDebug(omMemCell cell, unsigned long spec)
void omtTestFreeKeep(omMemCell cell)
void omtTestDupKeep(omMemCell cell, unsigned long spec)
void TestAddrContentEqual(void *s1, void *s2, size_t size)