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

Function _omPrintAddrInfo

omalloc/omDebugCheck.c:421–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421static void _omPrintAddrInfo(FILE* fd, omError_t error, void* addr, void* bin_size, omTrackFlags_t flags, int frames, const char* s)
422{
423 int x;
424 if ((! (x=omCheckPtr(addr, omError_MaxError, OM_FLR)))
425 ||(x==omError_UnalignedAddr))
426 {
427 fprintf(fd, "%s addr:%p size:%ld", s, addr, (long)omSizeOfAddr(addr));
428
429 if (error == omError_UnalignedAddr)
430 fputs(" unaligned",fd);
431
432 if (error == omError_WrongSize && (flags & OM_FSIZE))
433 fprintf(fd, " specified size:%ld", (long) bin_size);
434
435 if (error == omError_WrongBin && (flags & OM_FBIN))
436 fprintf(fd, " specified bin is of size:%ld",
437 (long)((omBin) bin_size)->sizeW << LOG_SIZEOF_LONG);
438
439 if (omIsTrackAddr(addr))
440 omPrintTrackAddrInfo(fd, addr, frames);
441 else
442 {
443 fputs(" !omIsTrackAddr\n",fd);
444 omPrintTrackAddrInfo(fd, addr, frames);
445 }
446 }
447 else
448 {
449 fprintf(fd, "%s (invalid) addr: %p (error=%d)\n", s, addr,x);
450 }
451}
452
453void omPrintAddrInfo(FILE* fd, void *addr, const char* s)
454{

Callers 3

omReportAddrErrorFunction · 0.85
omPrintAddrInfoFunction · 0.85
_omPrintUsedAddrFunction · 0.85

Calls 3

omCheckPtrFunction · 0.85
omSizeOfAddrFunction · 0.85
omPrintTrackAddrInfoFunction · 0.85

Tested by

no test coverage detected