IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42690


Ignore:
Timestamp:
Jun 24, 2024, 8:54:39 AM (2 years ago)
Author:
eugene
Message:

save and report penultimate block allocated (the last block may be corrupted while the previous one is ok and can give a clue to the failure)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20230313/Ohana/src/libohana/src/ohana_allocate.c

    r42074 r42690  
    448448  int status = TRUE;
    449449
     450  OhanaMemblock *prevBlock = NULL;
     451
    450452  while (thisBlock) {
    451453
     
    475477    Nbytes += thisBlock->size;
    476478
     479    prevBlock = thisBlock; // save for debugging
    477480    thisBlock = thisBlock->prevBlock;
    478481  }
     
    480483  if (Ntotal || VERBOSE) {
    481484    fprintf (stderr, "%zd memory blocks allocated (%zd bytes total), %zd good, %zd bad ", Ntotal, Nbytes, Ngood, Nbad);
    482     fprintf (stderr, "@ %s:%d (%s)\n", myFile, myLine, myFunc);
     485    fprintf (stderr, "@ %s:%d (%s) ", myFile, myLine, myFunc);
     486    fprintf (stderr, "(%zd penultimate block)\n", (size_t) prevBlock);
    483487  }
    484488
Note: See TracChangeset for help on using the changeset viewer.