Loading...
Searching...
No Matches
omtTest.h File Reference
`#include <time.h>`
`#include <string.h>`
`#include <limits.h>`
`#include "omConfig.h"`
`#include "omStructs.h"`

Go to the source code of this file.

## Data Structures

struct | omMemCell_t

## Macros

#define | TRACK_LEVEL 1
#define | CHECK_LEVEL 1
#define | KEEP_LEVEL 20
#define | MAX_CELLS 100000
#define | KEEP_ADDR 100
#define | END_CHECK_LEVEL 5
#define | myprintf(format, args...)
#define | myfflush(what)
#define | IS_STICKY_BIN(spec)
#define | GET_SIZE(spec)
#define | SET_SIZE(spec, size)
#define | IS_ALIGNED(spec)
#define | IS_ZERO(spec)
#define | IS_BIN(spec)
#define | IS_SPEC_BIN(spec)
#define | IS_INLINE(spec)
#define | DO_FREE(spec)
#define | DO_REALLOC(spec)
#define | DO_DUP(spec)
#define | DO_CHECK(spec)
#define | DO_FREE_CHECK(spec)
#define | DO_TRACK(spec)
#define | GET_TRACK(spec)
#define | DO_KEEP(spec)
#define | DO_FREE_KEEP(spec)
#define | IS_FREE_SIZE(spec)
#define | IS_FREE_BIN(spec)
#define | IS_SLOPPY(spec)
#define | IS_FREE_BINADDR(spec)
#define | SPEC_MAX ULONG_MAX
#define | SIZE_MAX ((((unsigned long) 1) << 14) -1)
#define | RANGE_MIN (((unsigned long) 1) << 6)
#define | RANGE_MAX (((unsigned long) 1) << 14)
#define | PAGES_PER_REGION 128

## Typedefs

typedef omMemCell_t * | omMemCell

## Functions

void | TestAlloc (omMemCell cell, unsigned long spec)
void | TestRealloc (omMemCell cell, unsigned long spec)
void | TestFree (omMemCell cell)
void | omtTestAlloc (omMemCell cell, unsigned long spec)
void | omtTestRealloc (omMemCell cell, unsigned long spec)
void | omtTestDup (omMemCell cell, unsigned long spec)
void | omtTestFree (omMemCell cell)
void | omtTestAllocDebug (omMemCell cell, unsigned long spec)
void | omtTestReallocDebug (omMemCell cell, unsigned long spec)
void | omtTestDupDebug (omMemCell cell, unsigned long spec)
void | omtTestFreeDebug (omMemCell cell)
void | omtTestAllocKeep (omMemCell cell, unsigned long spec)
void | omtTestReallocKeep (omMemCell cell, unsigned long spec)
void | omtTestDupKeep (omMemCell cell, unsigned long spec)
void | omtTestFreeKeep (omMemCell cell)
void | InitCellAddrContent (omMemCell cell)
int | omtTestErrors ()
omBin | omtGetStickyBin (omBin bin)
void | omtTestDebug (omMemCell cell)
void | TestAddrContent (void *addr, unsigned long value, size_t size)
void | TestAddrContentEqual (void *s1, void *s2, size_t size)

## Variables

omMemCell_t | cells []

## Data Structure Documentation

## omMemCell_s

struct omMemCell_s

Definition at line 24 of file omtTest.h.

Data Fields
void * | addr |
omBin | bin |
omBin | orig_bin |
unsigned long | spec |

## Macro Definition Documentation

## CHECK_LEVEL

#define CHECK_LEVEL 1

Definition at line 10 of file omtTest.h.

## DO_CHECK

#define DO_CHECK | ( |  | spec | ) |

Value:
(spec & (((unsigned long) 1) << 22))

Definition at line 63 of file omtTest.h.

## DO_DUP

#define DO_DUP | ( |  | spec | ) |

Value:
((spec & (((unsigned long) 1) << 20)) && ! (spec & (((unsigned long) 1) << 21)))

Definition at line 60 of file omtTest.h.

## DO_FREE

#define DO_FREE | ( |  | spec | ) |

Value:
(!(spec & (((unsigned long) 1) << 20)) && !(spec & (((unsigned long) 1) << 21)))

Definition at line 58 of file omtTest.h.

## DO_FREE_CHECK

#define DO_FREE_CHECK | ( |  | spec | ) |

Value:
(spec & (((unsigned long) 1) << 23))

Definition at line 64 of file omtTest.h.

## DO_FREE_KEEP

#define DO_FREE_KEEP | ( |  | spec | ) |

Value:
(DO_FREE_CHECK(spec) && (spec % KEEP_LEVEL == 0))
DO_FREE_CHECK
#define DO_FREE_CHECK(spec)
Definition omtTest.h:64
KEEP_LEVEL
#define KEEP_LEVEL
Definition omtTest.h:12

Definition at line 80 of file omtTest.h.

## DO_KEEP

#define DO_KEEP | ( |  | spec | ) |

Value:
(DO_CHECK(spec) && (spec % KEEP_LEVEL == 0))
DO_CHECK
#define DO_CHECK(spec)
Definition omtTest.h:63

Definition at line 79 of file omtTest.h.

## DO_REALLOC

#define DO_REALLOC | ( |  | spec | ) |

Value:
((spec & (((unsigned long) 1) << 20)) && (spec & (((unsigned long) 1) << 21)))

Definition at line 59 of file omtTest.h.

## DO_TRACK

#define DO_TRACK | ( |  | spec | ) |

Value:
(spec & (((unsigned long) 1) << 24))

Definition at line 70 of file omtTest.h.

## END_CHECK_LEVEL

#define END_CHECK_LEVEL 5

Definition at line 20 of file omtTest.h.

## GET_SIZE

#define GET_SIZE | ( |  | spec | ) |

Value:
OM_ALIGN_SIZE((spec & ((((unsigned long) 1) << 14) -1)))

Definition at line 51 of file omtTest.h.

## GET_TRACK

#define GET_TRACK | ( |  | spec | ) |

Value:
(((spec & ((((unsigned long) 1) << 27) | (((unsigned long) 1) << 26) | (((unsigned long) 1) << 25))) >> 25) % 5) + TRACK_LEVEL
TRACK_LEVEL
#define TRACK_LEVEL
Definition omtTest.h:9

Definition at line 71 of file omtTest.h.

## IS_ALIGNED

#define IS_ALIGNED | ( |  | spec | ) |

Value:
(spec & (((unsigned long) 1) << 15))

Definition at line 53 of file omtTest.h.

## IS_BIN

#define IS_BIN | ( |  | spec | ) |

Value:
(spec & (((unsigned long) 1) << 17))

Definition at line 55 of file omtTest.h.

## IS_FREE_BIN

#define IS_FREE_BIN | ( |  | spec | ) |

Value:
(spec & (((unsigned long) 1) << 29))

Definition at line 87 of file omtTest.h.

## IS_FREE_BINADDR

#define IS_FREE_BINADDR | ( |  | spec | ) |

Value:
(spec & (((unsigned long) 1) << 31))

Definition at line 89 of file omtTest.h.

## IS_FREE_SIZE

#define IS_FREE_SIZE | ( |  | spec | ) |

Value:
(spec & (((unsigned long) 1) << 28))

Definition at line 86 of file omtTest.h.

## IS_INLINE

#define IS_INLINE | ( |  | spec | ) |

Value:
(spec & (((unsigned long) 1) << 19))

Definition at line 57 of file omtTest.h.

## IS_SLOPPY

#define IS_SLOPPY | ( |  | spec | ) |

Value:
(spec & (((unsigned long) 1) << 30))

Definition at line 88 of file omtTest.h.

## IS_SPEC_BIN

#define IS_SPEC_BIN | ( |  | spec | ) |

Value:
(spec & (((unsigned long) 1) << 18))

Definition at line 56 of file omtTest.h.

## IS_STICKY_BIN

#define IS_STICKY_BIN | ( |  | spec | ) |

Value:
(spec & 1)

Definition at line 49 of file omtTest.h.

## IS_ZERO

#define IS_ZERO | ( |  | spec | ) |

Value:
(spec & (((unsigned long) 1) << 16))

Definition at line 54 of file omtTest.h.

## KEEP_ADDR

#define KEEP_ADDR 100

Definition at line 18 of file omtTest.h.

## KEEP_LEVEL

#define KEEP_LEVEL 20

Definition at line 12 of file omtTest.h.

## MAX_CELLS

#define MAX_CELLS 100000

Definition at line 17 of file omtTest.h.

## myfflush

#define myfflush | ( |  | what | ) |

Value:
do {} while (0)

Definition at line 46 of file omtTest.h.

## myprintf

#define myprintf | ( |  | format,
|  |  | args... )

Value:
do {} while (0)

Definition at line 45 of file omtTest.h.

## PAGES_PER_REGION

#define PAGES_PER_REGION 128

Definition at line 97 of file omtTest.h.

## RANGE_MAX

#define RANGE_MAX (((unsigned long) 1) << 14)

Definition at line 95 of file omtTest.h.

## RANGE_MIN

#define RANGE_MIN (((unsigned long) 1) << 6)

Definition at line 94 of file omtTest.h.

## SET_SIZE

#define SET_SIZE | ( |  | spec,
|  |  | size )

Value:
spec = ((spec & ~((((unsigned long) 1) << 14) -1)) | (size))
size
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition cf_ops.cc:600

Definition at line 52 of file omtTest.h.

## SIZE_MAX

#define SIZE_MAX ((((unsigned long) 1) << 14) -1)

Definition at line 93 of file omtTest.h.

## SPEC_MAX

#define SPEC_MAX ULONG_MAX

Definition at line 92 of file omtTest.h.

## TRACK_LEVEL

#define TRACK_LEVEL 1

Definition at line 9 of file omtTest.h.

## Typedef Documentation

## omMemCell

typedef omMemCell_t* omMemCell

Definition at line 33 of file omtTest.h.

## Function Documentation

## InitCellAddrContent()

void InitCellAddrContent | ( | omMemCell | cell | ) |

Definition at line 130 of file omtTest.c.

{
size_t sizeW = omSizeWOfAddr(cell->addr);
omMemsetW(cell->addr, (IS_ZERO(cell->spec) ? 0 : cell->spec), sizeW);
}
omMemsetW
#define omMemsetW(P1, W, L)
Definition omMemOps.h:161
IS_ZERO
#define IS_ZERO(spec)
Definition omtTest.h:54
omSizeWOfAddr
#define omSizeWOfAddr(P)
Definition xalloc.h:223

## omtGetStickyBin()

omBin omtGetStickyBin | ( | omBin | bin | ) |

Definition at line 275 of file omtTest.c.

{
omBin sticky_bin = omFindInGList(om_StickyBins, next, max_blocks, bin->max_blocks);
if (sticky_bin == NULL)
sticky_bin = omGetStickyBinOfBin(bin);
return sticky_bin;
}
next
ListNode * next
Definition janet.h:31
om_StickyBins
omBin om_StickyBins
Definition omBin.c:374
NULL
#define NULL
Definition omList.c:12
omFindInGList
#define omFindInGList(ptr, next, what, value)
Definition omList.h:104
omBin
omBin_t * omBin
Definition omStructs.h:12
omGetStickyBinOfBin
#define omGetStickyBinOfBin(B)
Definition xalloc.h:247

## omtTestAlloc()

void omtTestAlloc | ( | omMemCell | cell,
|  | unsigned long | spec )

Definition at line 33 of file omtTestAlloc.c.

{
size_t size = GET_SIZE(spec);
void* addr;
omBin bin = NULL;
omBin orig_bin = NULL;
if (IS_BIN(spec) && (size <= OM_MAX_BLOCK_SIZE || IS_SPEC_BIN(spec)))
{
if (IS_SPEC_BIN(spec))
{
if (IS_ALIGNED(spec))
bin = omGetAlignedSpecBin(size);
else
bin = omGetSpecBin(size);
}
else
{
if (IS_ALIGNED(spec))
bin = omSmallSize2AlignedBin(size);
else
bin = omSmallSize2Bin(size);
}
if (IS_STICKY_BIN(spec))
{
orig_bin = bin;
bin = omtGetStickyBin(bin);
}
if (IS_INLINE(spec))
{
if (IS_ZERO(spec))
addr = omAlloc0Bin(bin);
else
addr = omAllocBin(bin);
}
else
{
if (IS_ZERO(spec))
omTypeAlloc0Bin(void*, addr, bin);
else
omTypeAllocBin(void*, addr, bin);
}
}
else
{
if (IS_INLINE(spec))
{
if (IS_ZERO(spec))
{
if (IS_ALIGNED(spec))
{
if (IS_SLOPPY(spec))
addr = omalloc0(size);
else
addr = omAlloc0Aligned(size);
}
else
addr = omAlloc0(size);
}
else
{
if (IS_ALIGNED(spec))
{
if (IS_SLOPPY(spec))
addr = omalloc(size);
else
addr = omAllocAligned(size);
}
else
addr = omAlloc(size);
}
}
else
{
if (IS_ZERO(spec))
{
if (IS_ALIGNED(spec))
omTypeAlloc0Aligned(void*, addr, size);
else
omTypeAlloc0(void*, addr, size);
}
else
{
if (IS_ALIGNED(spec))
omTypeAllocAligned(void*, addr, size);
else
omTypeAlloc(void*, addr, size);
}
}
}
cell->addr = addr;
cell->bin = bin;
cell->orig_bin = orig_bin;
cell->spec = spec;
InitCellAddrContent(cell);
omtTestDebug(cell);
}
omTypeAlloc0Bin
#define omTypeAlloc0Bin(type, addr, bin)
Definition omAllocDecl.h:204
omAlloc0Aligned
#define omAlloc0Aligned
Definition omAllocDecl.h:274
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210
omTypeAllocBin
#define omTypeAllocBin(type, addr, bin)
Definition omAllocDecl.h:203
omAllocBin
#define omAllocBin(bin)
Definition omAllocDecl.h:205
omAlloc0Bin
#define omAlloc0Bin(bin)
Definition omAllocDecl.h:206
omTypeAlloc0
#define omTypeAlloc0(type, addr, size)
Definition omAllocDecl.h:209
omalloc0
#define omalloc0(size)
Definition omAllocDecl.h:229
omalloc
#define omalloc(size)
Definition omAllocDecl.h:228
omTypeAlloc0Aligned
#define omTypeAlloc0Aligned
Definition omAllocDecl.h:272
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211
omTypeAlloc
#define omTypeAlloc(type, addr, size)
Definition omAllocDecl.h:208
omTypeAllocAligned
#define omTypeAllocAligned
Definition omAllocDecl.h:271
omAllocAligned
#define omAllocAligned
Definition omAllocDecl.h:273
omSmallSize2Bin
#define omSmallSize2Bin(size)
Definition omAllocPrivate.h:211
omGetSpecBin
#define omGetSpecBin(size)
Definition omBin.h:11
omGetAlignedSpecBin
#define omGetAlignedSpecBin(size)
Definition omBin.h:10
OM_MAX_BLOCK_SIZE
#define OM_MAX_BLOCK_SIZE
Definition omTables.c:31
omSmallSize2AlignedBin
#define omSmallSize2AlignedBin
Definition omtTestAlloc.c:29
omtGetStickyBin
omBin omtGetStickyBin(omBin bin)
Definition omtTest.c:275
omtTestDebug
void omtTestDebug(omMemCell cell)
Definition omtTest.c:36
InitCellAddrContent
void InitCellAddrContent(omMemCell cell)
Definition omtTest.c:130
IS_SPEC_BIN
#define IS_SPEC_BIN(spec)
Definition omtTest.h:56
IS_STICKY_BIN
#define IS_STICKY_BIN(spec)
Definition omtTest.h:49
IS_ALIGNED
#define IS_ALIGNED(spec)
Definition omtTest.h:53
IS_BIN
#define IS_BIN(spec)
Definition omtTest.h:55
IS_SLOPPY
#define IS_SLOPPY(spec)
Definition omtTest.h:88
IS_INLINE
#define IS_INLINE(spec)
Definition omtTest.h:57
GET_SIZE
#define GET_SIZE(spec)
Definition omtTest.h:51

## omtTestAllocDebug()

void omtTestAllocDebug | ( | omMemCell | cell,
|  | unsigned long | spec )

## omtTestAllocKeep()

void omtTestAllocKeep | ( | omMemCell | cell,
|  | unsigned long | spec )

## omtTestDebug()

void omtTestDebug | ( | omMemCell | cell | ) |

Definition at line 36 of file omtTest.c.

{
size_t size = GET_SIZE(cell->spec);
size_t is_size;
if (om_ErrorStatus != omError_NoError) return;
if (cell->bin != NULL)
{
if (IS_ALIGNED(cell->spec))
omDebugAddrAlignedBin(cell->addr, cell->bin);
else
omDebugAddrBin(cell->addr, cell->bin);
}
else
{
if (IS_ALIGNED(cell->spec))
omDebugAddrAlignedSize(cell->addr, size);
else
omDebugAddrSize(cell->addr, size);
}
if (om_ErrorStatus != omError_NoError) return;
if (!OM_IS_ALIGNED(cell->addr))
{
omReportError(omError_Unknown, omError_NoError, OM_FLR,
"addr:%p is unaligned", cell->addr);
return;
}
if (IS_ALIGNED(cell->spec) && !OM_IS_STRICT_ALIGNED(cell->addr))
{
omReportError(omError_Unknown, omError_NoError, OM_FLR,
"addr:%p is not strict unaligned", cell->addr);
return;
}
is_size = omSizeOfAddr(cell->addr);
if (is_size < size)
{
omReportError(omError_Unknown, omError_NoError, OM_FLR,
"is_size==%u < size==%u", is_size, size);
return;
}
if (is_size >> LOG_SIZEOF_LONG != omSizeWOfAddr(cell->addr))
{
omReportError(omError_Unknown, omError_NoError, OM_FLR,
"is_sizeW==%u < sizeW==%u", is_size >> LOG_SIZEOF_LONG, omSizeWOfAddr(cell->addr));
return;
}
TestAddrContent(cell->addr, (IS_ZERO(cell->spec) ? 0 : cell->spec), is_size);
}
omDebugAddrAlignedBin
#define omDebugAddrAlignedBin
Definition omAllocDecl.h:291
omDebugAddrAlignedSize
#define omDebugAddrAlignedSize
Definition omAllocDecl.h:292
omDebugAddrSize
#define omDebugAddrSize(addr, size)
Definition omAllocDecl.h:313
omDebugAddrBin
#define omDebugAddrBin(addr, bin)
Definition omAllocDecl.h:311
omSizeOfAddr
size_t omSizeOfAddr(const void *addr)
Definition omAllocSystem.c:110
om_ErrorStatus
omError_t om_ErrorStatus
Definition omError.c:13
omReportError
omError_t omReportError(omError_t error, omError_t report_error, OM_FLR_DECL, const char *fmt,...)
Definition omError.c:80
omError_NoError
@ omError_NoError
Definition omError.h:18
omError_Unknown
@ omError_Unknown
Definition omError.h:19
TestAddrContent
void TestAddrContent(void *addr, unsigned long value, size_t size)
Definition omtTest.c:106

## omtTestDup()

void omtTestDup | ( | omMemCell | cell,
|  | unsigned long | spec )

Definition at line 348 of file omtTestAlloc.c.

{
omtTestDebug(cell);
if (DO_STRDUP(spec))
{
size_t size = omSizeOfAddr(cell->addr);
void* new_addr;
memset(cell->addr, 'a', size - 1);
((char*) cell->addr)[size-1] = '\0';
new_addr = omStrDup(cell->addr);
TestAddrContentEqual(new_addr, cell->addr, size);
omFree(new_addr);
InitCellAddrContent(cell);
}
else
{
void* new_addr = omMemDup(cell->addr);
TestAddrContentEqual(new_addr, cell->addr, omSizeOfAddr(cell->addr));
omFree(new_addr);
new_addr = omMemDupAligned(cell->addr);
TestAddrContentEqual(new_addr, cell->addr, omSizeOfAddr(cell->addr));
omDebugAddrAlignedSize(new_addr, omSizeOfAddr(cell->addr));
omFree(new_addr);
}
}
omStrDup
#define omStrDup(s)
Definition omAllocDecl.h:263
omFree
#define omFree(addr)
Definition omAllocDecl.h:261
omMemDup
#define omMemDup(s)
Definition omAllocDecl.h:264
omMemDupAligned
#define omMemDupAligned
Definition omAllocDecl.h:286
DO_STRDUP
#define DO_STRDUP(l)
Definition omtTestAlloc.c:347
TestAddrContentEqual
void TestAddrContentEqual(void *s1, void *s2, size_t size)
Definition omtTest.c:90

## omtTestDupDebug()

void omtTestDupDebug | ( | omMemCell | cell,
|  | unsigned long | spec )

## omtTestDupKeep()

void omtTestDupKeep | ( | omMemCell | cell,
|  | unsigned long | spec )

## omtTestErrors()

int omtTestErrors | ( |  | ) |

Definition at line 37 of file omtTestError.c.

{
#ifndef OM_NDEBUG
int level = om_Opts.MinCheck;
omError_t error;
struct LongSpec spec;
int missed = 0, alloc;
omMemCell cell = NULL;
printf("omtTestErrors: Start\n");
om_Opts.MinCheck = 2;
for (error = omError_MemoryCorrupted; error < omError_MaxError; error++)
{
om_InternalErrorStatus = omError_NoError;
om_ErrorStatus = omError_NoError;
printf("!!!expect %s\n", omError2Serror(error));
memset(&spec, 0, sizeof(struct LongSpec));
cell = NULL;
alloc = 0;
switch (error)
{
case omError_MemoryCorrupted:
{
spec.MaxSize = OM_MAX_BLOCK_SIZE;
cell = omFindCell(spec);
if (cell != NULL)
{
omBin bin = omGetTopBinOfAddr(cell->addr);
omBinPage last_page = bin->last_page;
omAssume(last_page != NULL);
bin->last_page = NULL;
omDebugBin(cell->bin);
bin->last_page = last_page;
}
else printf("cell not found\n");
break;
}
case omError_NullAddr:
{
omDebugAddr(NULL);
break;
}
case omError_InvalidRangeAddr:
{
omDebugAddr((void*) om_MaxAddr);
break;
}
case omError_FalseAddr:
{
spec.MinSize = 8;
spec.MaxSize = OM_MAX_BLOCK_SIZE;
spec.NoTrack = 1;
cell = omFindCell(spec);
if (cell != NULL)
{
omDebugAddr(cell->addr + SIZEOF_VOIDP);
}
else printf("cell not found\n");
break;
}
case omError_FalseAddrOrMemoryCorrupted:
{
spec.MinSize = 8;
spec.MinTrack = 3;
cell = omFindCell(spec);
if (cell != NULL)
{
omDebugAddr(cell->addr + SIZEOF_VOIDP);
}
else printf("cell not found\n");
break;
}
case omError_WrongSize:
{
spec.MaxSize = OM_MAX_BLOCK_SIZE;
cell = omFindCell(spec);
if (cell != NULL)
{
omDebugAddrSize(cell->addr, OM_MAX_BLOCK_SIZE + 1);
if (om_ErrorStatus != omError_NoError)
{
om_ErrorStatus = omError_NoError;
spec.MaxSize = 0;
spec.MinTrack = 3;
spec.NotIsBin = 1;
spec.MinSize = 2;
cell = omFindCell(spec);
if (cell != NULL)
{
omDebugAddrSize(cell->addr, GET_SIZE(cell->spec) + SIZEOF_OM_ALIGNMENT);
if (om_ErrorStatus != omError_NoError)
{
om_ErrorStatus = omError_NoError;
spec.MaxSize = OM_MAX_BLOCK_SIZE;
spec.MinTrack = 0;
spec.NotIsBin = 0;
cell = omFindCell(spec);
if (cell != NULL)
omDebugBinAddrSize(cell->addr, GET_SIZE(cell->spec) - 1);
else printf("cell not found");
}
}
else printf("cell not found\n");
}
}
else printf("cell not found\n");
break;
}
case omError_FreedAddr:
{
#if KEEP_LEVEL > 0
void* addr = om_AlwaysKeptAddrs;
while (addr != NULL && omIsTrackAddr(addr))
{
addr = *((void**) addr);
}
if (addr != NULL)
{
omFree(addr);
if (om_ErrorStatus == omError_FreedAddr)
{
om_ErrorStatus = omError_NoError;
addr = om_AlwaysKeptAddrs;
while (addr != NULL && ! omIsTrackAddr(addr))
{
addr = *((void**) addr);
}
if (addr != NULL)
{
addr = omAddr_2_OutAddr(addr);
omFree(addr);
}
}
}
if (addr == NULL)
{
printf("addr not found\n");
break;
}
if (om_ErrorStatus != omError_FreedAddr)
break;
#endif
spec.MinTrack = 5;
spec.NotIsBin = 1;
cell = omFindCell(spec);
if (cell != NULL)
{
omFree(cell->addr);
omFree(cell->addr);
alloc = 1;
cell->addr=NULL;
}
else printf("cell not found\n");
break;
}
case omError_FreedAddrOrMemoryCorrupted:
{
spec.MaxSize = OM_MAX_BLOCK_SIZE;
spec.NoTrack = 1;
cell = omFindCell(spec);
if (cell != NULL)
{
omBinPage page = omGetBinPageOfAddr(cell->addr);
omBinPageRegion region = page->region;
page->region = NULL;
om_Opts.MinCheck = 1;
omDebugAddr(cell->addr);
om_Opts.MinCheck = 2;
page->region = region;
}
else printf("cell not found\n");
break;
}
case omError_WrongBin:
{
spec.MaxSize = 32;
spec.NoTrack = 1;
cell = omFindCell(spec);
if (cell != NULL)
{
omDebugAddrBin(cell->addr, &om_StaticBin[OM_MAX_BIN_INDEX]);
}
else printf("cell not found\n");
break;
}
case omError_UnknownBin:
{
spec.MaxSize = OM_MAX_BLOCK_SIZE;
cell = omFindCell(spec);
if (cell != NULL)
{
omDebugAddrBin(cell->addr, (void*) omGetTopBinOfAddr(cell->addr) + SIZEOF_VOIDP);
}
else printf("cell not found\n");
break;
}
case omError_NotBinAddr:
{
spec.NotIsBin = 1;
spec.MinSize = OM_MAX_BLOCK_SIZE + 1;
cell = omFindCell(spec);
if (cell != NULL)
{
omDebugBinAddr(cell->addr);
}
else printf("cell not found");
break;
}
case omError_UnalignedAddr:
{
cell = omFindCell(spec);
if (cell != NULL)
{
omDebugAddr(cell->addr + 1);
}
else printf("cell not found\n");
break;
}
case omError_NullSizeAlloc:
{
void* addr = omAlloc(0);
addr = omRealloc(addr, 0);
omFree(addr);
break;
}
case omError_ListCycleError:
{
void* last = omListLast(om_SpecBin);
if (last != NULL)
{
*((void**)last) = om_SpecBin;
omCheckList(om_SpecBin, 5, omError_NoError, OM_FLR);
*((void**)last) = NULL;
} else printf("last == NULL\n");
break;
}
case omError_SortedListError:
{
if (om_SpecBin != NULL && om_SpecBin->next != NULL)
{
int max_blocks = om_SpecBin->max_blocks;
om_SpecBin->max_blocks = om_SpecBin->next->max_blocks + 1;
omCheckSortedList(om_SpecBin, max_blocks, 5, omError_NoError, OM_FLR);
om_SpecBin->max_blocks = max_blocks;
} else printf("om_SpecBin->next == NULL\n");
break;
}
case omError_KeptAddrListCorrupted:
{
if (om_KeptAddr != NULL)
{
void* last = omListLast(om_KeptAddr);
*((void**)last) = om_KeptAddr;
om_Opts.MinCheck = 5;
omDebugMemory();
om_Opts.MinCheck = 2;
*((void**)last) = NULL;
}
else printf("om_KeptAddr == NULL\n");
break;
}
case omError_FreePattern:
{
if (om_Opts.Keep > 0)
{
spec.MinTrack=3;
spec.NotIsBin = 1;
cell = omFindCell(spec);
if (cell != NULL)
{
void* value;
omFree(cell->addr);
value = *((void**) cell->addr);
*((void**) cell->addr) = value -1;
omDebugMemory();
*((void**) cell->addr) = value;
alloc = 1;
cell->addr = NULL;
}
else printf("cell not found\n");
}
else printf("om_Opts.Keep == 0");
break;
}
case omError_BackPattern:
{
spec.MinTrack = 3;
spec.NotIsBin = 1;
cell = omFindCell(spec);
if (cell != NULL)
{
void* addr = cell->addr + omSizeOfAddr(cell->addr);
void* value = *((void**) addr);
*((void**) addr) = value -1;
omDebugAddr(cell->addr);
*((void**) addr) = value;
}
else printf("cell not found\n");
break;
}
case omError_FrontPattern:
{
spec.MinTrack=3;
cell = omFindCell(spec);
if (cell != NULL)
{
void* addr = cell->addr - SIZEOF_VOIDP;
void* value = *((void**) addr);
*((void**) addr) = value -1;
omDebugAddr(cell->addr);
*((void**) addr) = value;
}
else printf("cell not found\n");
break;
}
case omError_NotString:
{
/* can only test for NULL string */
#if 0
spec.MaxSize = OM_MAX_BLOCK_SIZE;
cell = omFindCell(spec);
if (cell != NULL)
{
char* addr = (char*) cell->addr;
char* s;
memset(cell->addr, 1, omSizeOfAddr(cell->addr));
omDebugAddr(cell->addr);
s = omStrDup(addr);
omFree(s);
InitCellAddrContent(cell);
}
else printf("cell not found\n");
break;
#endif
omStrDup(NULL);
break;
}
case omError_StickyBin:
{
omMergeStickyBinIntoBin(NULL, NULL);
break;
}
default:
printf("No Error test implemented\n");
}
if (om_ErrorStatus != error)
{
printf("---missed %s\n", omError2Serror(error));
missed++;
}
else
{
printf("+++ok %s\n", omError2Serror(error));
}
om_ErrorStatus = omError_NoError;
if (cell != NULL)
{
if (alloc) TestAlloc(cell, cell->spec);
omtTestDebug(cell);
}
else
{
omDebugMemory();
}
if (om_ErrorStatus != omError_NoError)
{
printf("omtTest panik: memory corrupted\n\n");
return -1;
}
printf("\n");
}
printf("omtTestErrors: Summary: missed = %d\n\n", missed);
om_Opts.MinCheck = level;
return missed;
#else
return 0;
#endif
}
level
int level(const CanonicalForm &f)
Definition canonicalform.h:331
s
const CanonicalForm int s
Definition facAbsFact.cc:51
last
STATIC_VAR poly last
Definition hdegree.cc:1138
error
#define error(a)
Definition mpr_numeric.cc:966
omDebugMemory
#define omDebugMemory()
Definition omAllocDecl.h:318
omDebugBinAddrSize
#define omDebugBinAddrSize(addr, size)
Definition omAllocDecl.h:312
omDebugAddr
#define omDebugAddr(addr)
Definition omAllocDecl.h:314
omDebugBinAddr
#define omDebugBinAddr(addr)
Definition omAllocDecl.h:310
omRealloc
#define omRealloc(addr, size)
Definition omAllocDecl.h:225
omDebugBin
#define omDebugBin(bin)
Definition omAllocDecl.h:317
omGetTopBinOfAddr
#define omGetTopBinOfAddr(addr)
Definition omAllocPrivate.h:78
om_StaticBin
omBin_t om_StaticBin[]
omGetBinPageOfAddr
#define omGetBinPageOfAddr(addr)
Definition omBinPage.h:22
om_AlwaysKeptAddrs
void * om_AlwaysKeptAddrs
Definition omDebug.c:31
om_KeptAddr
void * om_KeptAddr
Definition omDebug.c:28
om_MaxAddr
unsigned long om_MaxAddr
Definition omDebugCheck.c:19
omAddr_2_OutAddr
void * omAddr_2_OutAddr(void *addr)
omIsTrackAddr
#define omIsTrackAddr(addr)
Definition omDebug.h:12
omError2Serror
const char * omError2Serror(omError_t error)
Definition omError.c:65
om_InternalErrorStatus
omError_t om_InternalErrorStatus
Definition omError.c:14
omAssume
#define omAssume(x)
Definition omError.h:85
omError_WrongSize
@ omError_WrongSize
Definition omError.h:26
omError_ListCycleError
@ omError_ListCycleError
Definition omError.h:34
omError_BackPattern
@ omError_BackPattern
Definition omError.h:38
omError_NullAddr
@ omError_NullAddr
Definition omError.h:22
omError_NullSizeAlloc
@ omError_NullSizeAlloc
Definition omError.h:33
omError_MaxError
@ omError_MaxError
Definition omError.h:42
omError_FrontPattern
@ omError_FrontPattern
Definition omError.h:39
omError_UnalignedAddr
@ omError_UnalignedAddr
Definition omError.h:32
omError_MemoryCorrupted
@ omError_MemoryCorrupted
Definition omError.h:21
omError_FreedAddr
@ omError_FreedAddr
Definition omError.h:27
omError_UnknownBin
@ omError_UnknownBin
Definition omError.h:30
omError_FreedAddrOrMemoryCorrupted
@ omError_FreedAddrOrMemoryCorrupted
Definition omError.h:28
omError_NotString
@ omError_NotString
Definition omError.h:40
omError_SortedListError
@ omError_SortedListError
Definition omError.h:35
omError_KeptAddrListCorrupted
@ omError_KeptAddrListCorrupted
Definition omError.h:36
omError_NotBinAddr
@ omError_NotBinAddr
Definition omError.h:31
omError_InvalidRangeAddr
@ omError_InvalidRangeAddr
Definition omError.h:23
omError_FalseAddr
@ omError_FalseAddr
Definition omError.h:24
omError_WrongBin
@ omError_WrongBin
Definition omError.h:29
omError_StickyBin
@ omError_StickyBin
Definition omError.h:41
omError_FreePattern
@ omError_FreePattern
Definition omError.h:37
omError_FalseAddrOrMemoryCorrupted
@ omError_FalseAddrOrMemoryCorrupted
Definition omError.h:25
omError_t
enum omError_e omError_t
Definition omError.h:44
omCheckSortedList
#define omCheckSortedList(ptr, what, level, report, OM_FLR_VAL)
Definition omList.h:85
omListLast
#define omListLast(ptr)
Definition omList.h:64
omCheckList
#define omCheckList(ptr, level, report, OM_FLR_VAL)
Definition omList.h:83
om_Opts
omOpts_t om_Opts
Definition omOpts.c:13
omBinPage
omBinPage_t * omBinPage
Definition omStructs.h:16
omBinPageRegion
omBinPageRegion_t * omBinPageRegion
Definition omStructs.h:20
OM_MAX_BIN_INDEX
#define OM_MAX_BIN_INDEX
Definition omTables.h:4
om_SpecBin
omSpecBin om_SpecBin
Definition om_Alloc.c:20
omFindCell
omMemCell omFindCell(struct LongSpec spec)
Definition omtTestError.c:16
LongSpec
Definition omtTestError.c:7
TestAlloc
void TestAlloc(omMemCell cell, unsigned long spec)
Definition omtTest.c:182
omMemCell
omMemCell_t * omMemCell
Definition omtTest.h:33
omMergeStickyBinIntoBin
#define omMergeStickyBinIntoBin(A, B)
Definition xalloc.h:275

## omtTestFree()

void omtTestFree | ( | omMemCell | cell | ) |

Definition at line 135 of file omtTestAlloc.c.

{
void* addr = cell->addr;
unsigned long spec = cell->spec;
omBin bin = cell->bin;
omBin orig_bin = cell->orig_bin;
size_t size = GET_SIZE(spec);
omtTestDebug(cell);
if (IS_FREE_SIZE(spec))
{
if (IS_SLOPPY(spec))
omfreeSize(addr, size);
else
omFreeSize(addr, size);
}
else if (bin != NULL && IS_FREE_BIN(spec))
omFreeBin(addr, bin);
else if (IS_FREE_BINADDR(spec) && (bin != NULL) && (size <= OM_MAX_BLOCK_SIZE))
{
omFreeBinAddr(addr);
}
else
{
if (IS_SLOPPY(spec))
omfree(addr);
else
omFree(addr);
}
if (bin != NULL && IS_SPEC_BIN(spec))
{
if (orig_bin != NULL)
omUnGetSpecBin(&orig_bin);
else
omUnGetSpecBin(&bin);
}
cell->addr = NULL;
cell->spec = 0;
cell->bin = NULL;
cell->orig_bin = NULL;
}
omfree
#define omfree(addr)
Definition omAllocDecl.h:237
omFreeSize
#define omFreeSize(addr, size)
Definition omAllocDecl.h:260
omFreeBin
#define omFreeBin(addr, bin)
Definition omAllocDecl.h:259
omFreeBinAddr
#define omFreeBinAddr(addr)
Definition omAllocDecl.h:258
omfreeSize
#define omfreeSize(addr, size)
Definition omAllocDecl.h:236
omUnGetSpecBin
#define omUnGetSpecBin(bin_ptr)
Definition omBin.h:14
IS_FREE_BINADDR
#define IS_FREE_BINADDR(spec)
Definition omtTest.h:89
IS_FREE_SIZE
#define IS_FREE_SIZE(spec)
Definition omtTest.h:86
IS_FREE_BIN
#define IS_FREE_BIN(spec)
Definition omtTest.h:87

## omtTestFreeDebug()

void omtTestFreeDebug | ( | omMemCell | cell | ) |

## omtTestFreeKeep()

void omtTestFreeKeep | ( | omMemCell | cell | ) |

## omtTestRealloc()

void omtTestRealloc | ( | omMemCell | cell,
|  | unsigned long | spec )

Definition at line 180 of file omtTestAlloc.c.

{
void* old_addr = cell->addr;
unsigned long old_spec = cell->spec;
omBin old_bin = cell->bin;
omBin old_orig_bin = cell->orig_bin;
size_t old_size = GET_SIZE(old_spec);
void* new_addr;
omBin new_bin = NULL;
omBin new_orig_bin = NULL;
size_t new_size = GET_SIZE(new_spec);
size_t real_old_size = omSizeOfAddr(old_addr);
size_t min_size;
omtTestDebug(cell);
if (old_bin != NULL && IS_FREE_BIN(old_spec) &&
IS_BIN(new_spec) && ((new_size <= OM_MAX_BLOCK_SIZE) || IS_SPEC_BIN(new_spec)))
{
if (IS_SPEC_BIN(new_spec))
{
if (IS_ALIGNED(new_spec))
new_bin = omGetAlignedSpecBin(new_size);
else
new_bin = omGetSpecBin(new_size);
}
else
{
if (IS_ALIGNED(new_spec))
new_bin = omSmallSize2AlignedBin(new_size);
else
new_bin = omSmallSize2Bin(new_size);
}
if (IS_STICKY_BIN(new_spec))
{
new_orig_bin = new_bin;
new_bin = omtGetStickyBin(new_bin);
}
if (IS_INLINE(new_spec))
{
if (IS_ZERO(new_spec)) new_addr = omRealloc0Bin(old_addr, old_bin, new_bin);
else new_addr = omReallocBin(old_addr, old_bin, new_bin);
}
else
{
if (IS_ZERO(new_spec)) omTypeRealloc0Bin(old_addr, old_bin, void*, new_addr, new_bin);
else omTypeReallocBin(old_addr, old_bin, void*, new_addr, new_bin);
}
}
else
{
if (IS_FREE_SIZE(old_spec))
{
if (IS_INLINE(new_spec))
{
if (IS_ZERO(new_spec))
{
if (IS_ALIGNED(new_spec))
{
if (IS_SLOPPY(new_spec))
new_addr = omrealloc0Size(old_addr, old_size, new_size);
else
new_addr = omRealloc0AlignedSize(old_addr, old_size, new_size);
}
else
new_addr = omRealloc0Size(old_addr, old_size, new_size);
}
else
{
if (IS_ALIGNED(new_spec))
{
if (IS_SLOPPY(new_spec))
new_addr = omreallocSize(old_addr, old_size, new_size);
else
new_addr = omReallocAlignedSize(old_addr, old_size, new_size);
}
else new_addr = omReallocSize(old_addr, old_size, new_size);
}
}
else
{
if (IS_ZERO(new_spec))
{
if (IS_ALIGNED(new_spec)) omTypeRealloc0AlignedSize(old_addr, old_size, void*, new_addr, new_size);
else omTypeRealloc0Size(old_addr, old_size, void*, new_addr, new_size);
}
else
{
if (IS_ALIGNED(new_spec)) omTypeReallocAlignedSize(old_addr, old_size, void*, new_addr, new_size);
else omTypeReallocSize(old_addr, old_size, void*, new_addr, new_size);
}
}
}
else
{
if (IS_INLINE(new_spec))
{
if (IS_ZERO(new_spec))
{
if (IS_ALIGNED(new_spec))
{
if (IS_SLOPPY(new_spec))
new_addr = omrealloc0(old_addr, new_size);
else
new_addr = omRealloc0Aligned(old_addr, new_size);
}
else new_addr = omRealloc0(old_addr, new_size);
}
else
{
if (IS_ALIGNED(new_spec))
{
if (IS_SLOPPY(new_spec))
new_addr = omrealloc(old_addr, new_size);
else
new_addr = omReallocAligned(old_addr, new_size);
}
else new_addr = omRealloc(old_addr, new_size);
}
}
else
{
if (IS_ZERO(new_spec))
{
if (IS_ALIGNED(new_spec)) omTypeRealloc0Aligned(old_addr, void*, new_addr, new_size);
else omTypeRealloc0(old_addr, void*, new_addr, new_size);
}
else
{
if (IS_ALIGNED(new_spec)) omTypeReallocAligned(old_addr, void*, new_addr, new_size);
else omTypeRealloc(old_addr, void*, new_addr, new_size);
}
}
}
}
if (old_bin != NULL && IS_SPEC_BIN(old_spec))
{
if (old_orig_bin != NULL)
omUnGetSpecBin(&old_orig_bin);
else
omUnGetSpecBin(&old_bin);
}
new_size = omSizeOfAddr(new_addr);
old_size = real_old_size;
min_size = (new_size < old_size ? new_size : old_size);
if (IS_ZERO(old_spec) && IS_ZERO(new_spec))
TestAddrContent(new_addr, 0, new_size);
else
{
TestAddrContent(new_addr, (IS_ZERO(old_spec) ? 0 : old_spec), min_size);
if (IS_ZERO(new_spec) && old_size < new_size)
TestAddrContent((char *)new_addr + old_size, 0, new_size - old_size);
}
cell->addr = new_addr;
cell->spec = new_spec;
cell->bin = new_bin;
cell->orig_bin = new_orig_bin;
InitCellAddrContent(cell);
omtTestDebug(cell);
}
omrealloc
#define omrealloc(addr, size)
Definition omAllocDecl.h:233
omTypeReallocAlignedSize
#define omTypeReallocAlignedSize
Definition omAllocDecl.h:276
omTypeRealloc0
#define omTypeRealloc0(o_addr, type, addr, size)
Definition omAllocDecl.h:224
omTypeRealloc0Size
#define omTypeRealloc0Size(o_addr, o_size, type, addr, size)
Definition omAllocDecl.h:219
omRealloc0AlignedSize
#define omRealloc0AlignedSize
Definition omAllocDecl.h:279
omrealloc0Size
#define omrealloc0Size(addr, o_size, size)
Definition omAllocDecl.h:232
omRealloc0Aligned
#define omRealloc0Aligned
Definition omAllocDecl.h:284
omreallocSize
#define omreallocSize(addr, o_size, size)
Definition omAllocDecl.h:231
omReallocSize
#define omReallocSize(addr, o_size, size)
Definition omAllocDecl.h:220
omReallocAligned
#define omReallocAligned
Definition omAllocDecl.h:283
omTypeRealloc0AlignedSize
#define omTypeRealloc0AlignedSize
Definition omAllocDecl.h:277
omrealloc0
#define omrealloc0(addr, size)
Definition omAllocDecl.h:234
omRealloc0Bin
#define omRealloc0Bin(o_addr, o_bin, bin)
Definition omAllocDecl.h:216
omTypeRealloc0Bin
#define omTypeRealloc0Bin(o_addr, o_bin, type, addr, bin)
Definition omAllocDecl.h:214
omReallocAlignedSize
#define omReallocAlignedSize
Definition omAllocDecl.h:278
omTypeRealloc0Aligned
#define omTypeRealloc0Aligned
Definition omAllocDecl.h:282
omReallocBin
#define omReallocBin(o_addr, o_bin, bin)
Definition omAllocDecl.h:215
omRealloc0Size
#define omRealloc0Size(addr, o_size, size)
Definition omAllocDecl.h:221
omTypeReallocAligned
#define omTypeReallocAligned
Definition omAllocDecl.h:281
omRealloc0
#define omRealloc0(addr, size)
Definition omAllocDecl.h:226
omTypeReallocSize
#define omTypeReallocSize(o_addr, o_size, type, addr, size)
Definition omAllocDecl.h:218
omTypeReallocBin
#define omTypeReallocBin(o_addr, o_bin, type, addr, bin)
Definition omAllocDecl.h:213
omTypeRealloc
#define omTypeRealloc(o_addr, type, addr, size)
Definition omAllocDecl.h:223

## omtTestReallocDebug()

void omtTestReallocDebug | ( | omMemCell | cell,
|  | unsigned long | spec )

## omtTestReallocKeep()

void omtTestReallocKeep | ( | omMemCell | cell,
|  | unsigned long | spec )

## TestAddrContent()

void TestAddrContent | ( | void * | addr,
|  | unsigned long | value,
|  | size_t | size )

Definition at line 106 of file omtTest.c.

{
size_t sizeW = OM_ALIGN_SIZE(size) >> LOG_SIZEOF_LONG;
int i;
if (!OM_IS_ALIGNED(addr))
{
omReportError(omError_Unknown, omError_NoError, OM_FLR,
"addr %p unaligned", addr);
return;
}
for (i=0; i<sizeW; i++)
{
if (((unsigned long*)addr)[i] != value)
{
omReportError(omError_Unknown, omError_NoError, OM_FLR,
"word %d modified: is %u should be %u", i, ((unsigned long*)addr)[i], value);
return;
}
}
}
i
int i
Definition cfEzgcd.cc:132

## TestAddrContentEqual()

void TestAddrContentEqual | ( | void * | s1,
|  | void * | s2,
|  | size_t | size )

Definition at line 90 of file omtTest.c.

{
int i;
size_t sizeW = OM_ALIGN_SIZE(size) >> LOG_SIZEOF_LONG;
for (i=0; i<sizeW; i++)
{
if (((unsigned long*)s1)[i] != ((unsigned long*)s2)[i])
{
omReportError(omError_Unknown, omError_NoError, OM_FLR,
"s1[%u]==%d != s2[%u]==%d", i, ((unsigned long*)s1)[i], i, ((unsigned long*)s2)[i]);
return;
}
}
}

## TestAlloc()

void TestAlloc | ( | omMemCell | cell,
|  | unsigned long | spec )

Definition at line 182 of file omtTest.c.

{
if (DO_CHECK(spec))
{
if (DO_TRACK(spec))
om_Opts.MinTrack = GET_TRACK(spec);
else
om_Opts.MinTrack = 0;
if (DO_KEEP(spec))
omtTestAllocKeep(cell, spec);
else
omtTestAllocDebug(cell, spec);
}
else
omtTestAlloc(cell, spec);
if (om_ErrorStatus != omError_NoError)
{
errors++;
om_ErrorStatus = omError_NoError;
}
}
errors
int errors
Definition omtTest.c:12
DO_KEEP
#define DO_KEEP(spec)
Definition omtTest.h:79
omtTestAlloc
void omtTestAlloc(omMemCell cell, unsigned long spec)
Definition omtTestAlloc.c:33
GET_TRACK
#define GET_TRACK(spec)
Definition omtTest.h:71
omtTestAllocKeep
void omtTestAllocKeep(omMemCell cell, unsigned long spec)
omtTestAllocDebug
void omtTestAllocDebug(omMemCell cell, unsigned long spec)
DO_TRACK
#define DO_TRACK(spec)
Definition omtTest.h:70

## TestFree()

void TestFree | ( | omMemCell | cell | ) |

Definition at line 252 of file omtTest.c.

{
if (cell->addr != NULL)
{
if (DO_FREE_CHECK(cell->spec))
{
if (DO_KEEP(cell->spec))
omtTestFreeKeep(cell);
else
omtTestFreeDebug(cell);
}
else
{
omtTestFree(cell);
}
if (om_ErrorStatus != omError_NoError)
{
errors++;
om_ErrorStatus = omError_NoError;
}
}
}
omtTestFreeDebug
void omtTestFreeDebug(omMemCell cell)
omtTestFree
void omtTestFree(omMemCell cell)
Definition omtTestAlloc.c:135
omtTestFreeKeep
void omtTestFreeKeep(omMemCell cell)

## TestRealloc()

void TestRealloc | ( | omMemCell | cell,
|  | unsigned long | spec )

Definition at line 205 of file omtTest.c.

{
if (DO_CHECK(spec))
{
if (DO_TRACK(spec))
om_Opts.MinTrack = GET_TRACK(spec);
else
om_Opts.MinTrack = 0;
if (DO_KEEP(spec))
omtTestReallocKeep(cell, spec);
else
omtTestReallocDebug(cell, spec);
}
else
omtTestRealloc(cell, spec);
if (om_ErrorStatus != omError_NoError)
{
errors++;
om_ErrorStatus = omError_NoError;
}
}
omtTestReallocDebug
void omtTestReallocDebug(omMemCell cell, unsigned long spec)
omtTestReallocKeep
void omtTestReallocKeep(omMemCell cell, unsigned long spec)
omtTestRealloc
void omtTestRealloc(omMemCell cell, unsigned long spec)
Definition omtTestAlloc.c:180

## Variable Documentation

## cells

omMemCell_t cells[]

extern

Definition at line 11 of file omtTest.c.