10#define OM_CHECK CHECK_LEVEL
11#define omtTestAlloc omtTestAllocDebug
12#define omtTestRealloc omtTestReallocDebug
13#define omtTestFree omtTestFreeDebug
14#define omtTestDup omtTestDupDebug
18#define OM_CHECK CHECK_LEVEL
20#define omtTestAlloc omtTestAllocKeep
21#define omtTestRealloc omtTestReallocKeep
22#define omtTestFree omtTestFreeKeep
23#define omtTestDup omtTestDupKeep
28#ifndef OM_ALIGNMENT_NEEDS_WORK
29#define omSmallSize2AlignedBin omSmallSize2Bin
127 cell->orig_bin = orig_bin;
137 void* addr = cell->addr;
138 unsigned long spec = cell->spec;
139 omBin bin = cell->bin;
140 omBin orig_bin = cell->orig_bin;
168 if (orig_bin !=
NULL)
177 cell->orig_bin =
NULL;
182 void* old_addr = cell->addr;
183 unsigned long old_spec = cell->spec;
184 omBin old_bin = cell->bin;
185 omBin old_orig_bin = cell->orig_bin;
186 size_t old_size =
GET_SIZE(old_spec);
190 size_t new_size =
GET_SIZE(new_spec);
216 new_orig_bin = new_bin;
223 else new_addr =
omReallocBin(old_addr, old_bin, new_bin);
288 else new_addr =
omRealloc0(old_addr, new_size);
295 new_addr =
omrealloc(old_addr, new_size);
299 else new_addr =
omRealloc(old_addr, new_size);
320 if (old_orig_bin !=
NULL)
327 old_size = real_old_size;
328 min_size = (new_size < old_size ? new_size : old_size);
335 if (
IS_ZERO(new_spec) && old_size < new_size)
339 cell->addr = new_addr;
340 cell->spec = new_spec;
342 cell->orig_bin = new_orig_bin;
347#define DO_STRDUP(l) (l & 1)
356 memset(cell->addr,
'a',
size - 1);
357 ((
char*) cell->addr)[
size-1] =
'\0';
365 void* new_addr =
omMemDup(cell->addr);
#define omTypeAlloc0Bin(type, addr, bin)
#define omrealloc(addr, size)
#define omTypeReallocAlignedSize
#define omTypeRealloc0(o_addr, type, addr, size)
#define omFreeSize(addr, size)
#define omTypeRealloc0Size(o_addr, o_size, type, addr, size)
#define omRealloc0AlignedSize
#define omrealloc0Size(addr, o_size, size)
#define omRealloc0Aligned
#define omreallocSize(addr, o_size, size)
#define omReallocSize(addr, o_size, size)
#define omDebugAddrAlignedSize
#define omTypeAllocBin(type, addr, bin)
#define omTypeRealloc0AlignedSize
#define omrealloc0(addr, size)
#define omRealloc0Bin(o_addr, o_bin, bin)
#define omTypeRealloc0Bin(o_addr, o_bin, type, addr, bin)
#define omTypeAlloc0(type, addr, size)
#define omRealloc(addr, size)
#define omTypeAlloc0Aligned
#define omReallocAlignedSize
#define omTypeRealloc0Aligned
#define omFreeBin(addr, bin)
#define omFreeBinAddr(addr)
#define omReallocBin(o_addr, o_bin, bin)
#define omRealloc0Size(addr, o_size, size)
#define omTypeAlloc(type, addr, size)
#define omTypeReallocAligned
#define omTypeAllocAligned
#define omRealloc0(addr, size)
#define omTypeReallocSize(o_addr, o_size, type, addr, size)
#define omTypeReallocBin(o_addr, o_bin, type, addr, bin)
#define omTypeRealloc(o_addr, type, addr, size)
#define omfreeSize(addr, size)
#define omSmallSize2Bin(size)
size_t omSizeOfAddr(const void *addr)
#define omGetSpecBin(size)
#define omGetAlignedSpecBin(size)
#define omUnGetSpecBin(bin_ptr)
#define OM_MAX_BLOCK_SIZE
void omtTestAlloc(omMemCell cell, unsigned long spec)
void omtTestRealloc(omMemCell cell, unsigned long new_spec)
void omtTestDup(omMemCell cell, unsigned long spec)
#define omSmallSize2AlignedBin
void omtTestFree(omMemCell cell)
void TestAddrContent(void *addr, unsigned long value, size_t size)
omBin omtGetStickyBin(omBin bin)
void omtTestDebug(omMemCell cell)
void InitCellAddrContent(omMemCell cell)
void TestAddrContentEqual(void *s1, void *s2, size_t size)
#define IS_SPEC_BIN(spec)
#define IS_FREE_BINADDR(spec)
#define IS_STICKY_BIN(spec)
#define IS_FREE_SIZE(spec)
#define IS_FREE_BIN(spec)