 |
My Project
debian-1:4.1.1-p2+ds-4
|
Go to the documentation of this file.
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
136 void*
addr = cell->addr;
137 unsigned long spec = cell->spec;
176 cell->orig_bin =
NULL;
181 void* old_addr = cell->addr;
182 unsigned long old_spec = cell->spec;
183 omBin old_bin = cell->bin;
184 omBin old_orig_bin = cell->orig_bin;
185 size_t old_size =
GET_SIZE(old_spec);
189 size_t new_size =
GET_SIZE(new_spec);
215 new_orig_bin = new_bin;
222 else new_addr =
omReallocBin(old_addr, old_bin, new_bin);
287 else new_addr =
omRealloc0(old_addr, new_size);
294 new_addr =
omrealloc(old_addr, new_size);
298 else new_addr =
omRealloc(old_addr, new_size);
319 if (old_orig_bin !=
NULL)
326 old_size = real_old_size;
327 min_size = (new_size < old_size ? new_size : old_size);
334 if (
IS_ZERO(new_spec) && old_size < new_size)
338 cell->addr = new_addr;
339 cell->spec = new_spec;
341 cell->orig_bin = new_orig_bin;
346 #define DO_STRDUP(l) (l & 1)
355 memset(cell->addr,
'a',
size - 1);
356 ((
char*) cell->addr)[
size-1] =
'\0';
364 void* new_addr =
omMemDup(cell->addr);
#define omTypeAlloc(type, addr, size)
#define omTypeRealloc0AlignedSize
void omtTestAlloc(omMemCell cell, unsigned long spec)
void TestAddrContentEqual(void *s1, void *s2, size_t size)
void omtTestDup(omMemCell cell, unsigned long spec)
#define omRealloc0Aligned
#define IS_FREE_BINADDR(spec)
size_t omSizeOfAddr(const void *addr)
#define omGetSpecBin(size)
#define omTypeAlloc0Aligned
#define omReallocAlignedSize
void InitCellAddrContent(omMemCell cell)
#define omTypeReallocSize(o_addr, o_size, type, addr, size)
#define omTypeRealloc0Bin(o_addr, o_bin, type, addr, bin)
#define omTypeReallocAlignedSize
#define omTypeReallocBin(o_addr, o_bin, type, addr, bin)
void omtTestFree(omMemCell cell)
#define omTypeRealloc(o_addr, type, addr, size)
#define omSmallSize2AlignedBin
#define omTypeRealloc0Aligned
#define omrealloc0Size(addr, o_size, size)
#define omRealloc(addr, size)
#define omTypeAlloc0(type, addr, size)
#define OM_MAX_BLOCK_SIZE
#define omTypeRealloc0(o_addr, type, addr, size)
#define omFreeSize(addr, size)
#define omfreeSize(addr, size)
#define omFreeBinAddr(addr)
#define IS_FREE_SIZE(spec)
void omtTestDebug(omMemCell cell)
#define IS_SPEC_BIN(spec)
#define omrealloc(addr, size)
#define omTypeAlloc0Bin(type, addr, bin)
#define IS_STICKY_BIN(spec)
#define omTypeAllocBin(type, addr, bin)
#define omSmallSize2Bin(size)
#define omRealloc0AlignedSize
#define omReallocBin(o_addr, o_bin, bin)
#define omTypeRealloc0Size(o_addr, o_size, type, addr, size)
void omtTestRealloc(omMemCell cell, unsigned long new_spec)
#define IS_FREE_BIN(spec)
void TestAddrContent(void *addr, unsigned long value, size_t size)
#define omrealloc0(addr, size)
omBin omtGetStickyBin(omBin bin)
#define omUnGetSpecBin(bin_ptr)
#define omGetAlignedSpecBin(size)
#define omreallocSize(addr, o_size, size)
#define omDebugAddrAlignedSize
#define omRealloc0(addr, size)
#define omRealloc0Size(addr, o_size, size)
#define omTypeAllocAligned
#define omTypeReallocAligned
#define omFreeBin(addr, bin)
#define omRealloc0Bin(o_addr, o_bin, bin)
#define omReallocSize(addr, o_size, size)