MCPcopy Create free account
hub / github.com/Singular/Singular / _omCheckAddr

Function _omCheckAddr

omalloc/omDebugCheck.c:36–47  ·  view source on GitHub ↗

* * First level omCheck routines: dispatch to lower-level omDoCheck * routines which do the actual tests * *******************************************************************/

Source from the content-addressed store, hash-verified

34 *
35 *******************************************************************/
36omError_t _omCheckAddr(void* addr, void* size_bin,
37 omTrackFlags_t flags, char check, omError_t report, OM_FLR_DECL)
38{
39 if (check <= 0) return omError_NoError;
40 if (check > 1)
41 {
42 omCheckReturn(check > 2 && _omCheckMemory(check - 2, (report ? report : omError_MemoryCorrupted), OM_FLR_VAL));
43 omCheckReturn(omIsBinPageAddr(addr) && omDoCheckBin(omGetBinOfAddr(addr), !omIsBinAddrTrackAddr(addr), check-1,
44 (report ? report : omError_MemoryCorrupted), OM_FLR_VAL));
45 }
46 return omDoCheckAddr(addr, size_bin, flags, check, report, OM_FLR_VAL);
47}
48
49omError_t _omCheckBin(omBin bin, int what_bin, char check, omError_t report, OM_FLR_DECL)
50{

Callers 6

_omDebugAllocFunction · 0.85
_omDebugReallocFunction · 0.85
_omDebugFreeFunction · 0.85
_omDebugMemDupFunction · 0.85
_omDebugStrDupFunction · 0.85
_omDebugAddrFunction · 0.85

Calls 3

_omCheckMemoryFunction · 0.85
omDoCheckBinFunction · 0.85
omDoCheckAddrFunction · 0.85

Tested by

no test coverage detected