IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38686


Ignore:
Timestamp:
Aug 28, 2015, 9:10:35 AM (11 years ago)
Author:
eugene
Message:

split memdump_func into memdump_file and _func (calling _file)

Location:
branches/eam_branches/ipp-20150625/Ohana/src/libohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150625/Ohana/src/libohana/include/ohana_allocate.h

    r38630 r38686  
    110110# endif /* OHANA_MEMORY */
    111111
     112void  ohana_memdump_file (FILE *f, int mode);
     113
    112114# endif /* OHANA_ALLOCATE */
  • branches/eam_branches/ipp-20150625/Ohana/src/libohana/src/ohana_allocate.c

    r38616 r38686  
    424424}
    425425
    426 void ohana_memdump_func (int VERBOSE) {
     426void ohana_memdump_file (FILE *f, int VERBOSE) {
    427427
    428428  if (!lastBlock) {
    429     if (VERBOSE) fprintf (stderr, "no memory allocated\n");
     429    if (VERBOSE) fprintf (f, "no memory allocated\n");
    430430    return;
    431431  }
     
    436436  size_t Nbytes = 0;
    437437
    438   fprintf (stderr, " entry | bytes | cumulative | STATUS | file | line | function\n");
     438  fprintf (f, " entry | bytes | cumulative | STATUS | file | line | function\n");
    439439
    440440  while (thisBlock) {
     
    456456    if (Ntotal < 100) {
    457457      if (good) {
    458         fprintf (stderr, "  %zd  %zd  %zd  GOOD  %s %d, func: %s\n", Ntotal, thisBlock->size, Nbytes, thisBlock->file, thisBlock->line, thisBlock->func);
     458        fprintf (f, "  %zd  %zd  %zd  GOOD  %s %d, func: %s\n", Ntotal, thisBlock->size, Nbytes, thisBlock->file, thisBlock->line, thisBlock->func);
    459459      } else {
    460         fprintf (stderr, "  %zd  %zd  %zd  BAD   %s %d, func: %s\n", Ntotal, thisBlock->size, Nbytes, thisBlock->file, thisBlock->line, thisBlock->func);
     460        fprintf (f, "  %zd  %zd  %zd  BAD   %s %d, func: %s\n", Ntotal, thisBlock->size, Nbytes, thisBlock->file, thisBlock->line, thisBlock->func);
    461461      }
    462462    }
     
    466466
    467467  if (Ntotal || VERBOSE) {
    468     fprintf (stderr, "%zd memory blocks allocated (%zd bytes total)\n", Ntotal, Nbytes);
    469   }
    470 
     468    fprintf (f, "%zd memory blocks allocated (%zd bytes total)\n", Ntotal, Nbytes);
     469  }
     470
     471  return;
     472}
     473
     474void ohana_memdump_func (int VERBOSE) {
     475  ohana_memdump_file (stderr, VERBOSE);
    471476  return;
    472477}
Note: See TracChangeset for help on using the changeset viewer.