IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31593


Ignore:
Timestamp:
Jun 1, 2011, 12:00:17 PM (15 years ago)
Author:
eugene
Message:

option for OHANA_MEMORY must be passed via make option

Location:
branches/eam_branches/ipp-20110505/Ohana/src/libohana
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110505/Ohana/src/libohana/include/ohana.h

    r31591 r31593  
    2020
    2121// comment this out to avoid the internal Ohana memory management code
    22 # define OHANA_MEMORY
     22// # define OHANA_MEMORY
    2323
    2424// XXX I was including these before, but RHL claims they are not needed
  • branches/eam_branches/ipp-20110505/Ohana/src/libohana/include/ohana_allocate.h

    r31591 r31593  
    1515# ifdef OHANA_MEMORY
    1616
    17 void *ohana_malloc (const char *file, int line, const char *func, int Nelem, size_t esize);
    18 void *ohana_realloc (const char *file, int line, const char *func, void *in, int Nelem, size_t esize);
     17void *ohana_malloc (const char *file, int line, const char *func, size_t Nelem, size_t esize);
     18void *ohana_realloc (const char *file, int line, const char *func, void *in, size_t Nelem, size_t esize);
    1919void  ohana_free (const char *file, int line, const char *func, void *in);
    2020void  ohana_memdump_func (int mode);
  • branches/eam_branches/ipp-20110505/Ohana/src/libohana/src/ohana_allocate.c

    r31591 r31593  
    44# include <stdint.h>
    55# include <pthread.h>
     6
     7# undef OHANA_MEMORY
    68# include "ohana_allocate.h"
    79
     
    276278    Nbytes += thisBlock->size;
    277279
    278     if (good) {
    279       fprintf (stderr, "  %zd  %zd  %zd  GOOD  %s %d, func: %s\n", Ntotal, thisBlock->size, Nbytes, thisBlock->file, thisBlock->line, thisBlock->func);
    280     } else {
    281       fprintf (stderr, "  %zd  %zd  %zd  BAD   %s %d, func: %s\n", Ntotal, thisBlock->size, Nbytes, thisBlock->file, thisBlock->line, thisBlock->func);
     280    if (Ntotal < 100) {
     281      if (good) {
     282        fprintf (stderr, "  %zd  %zd  %zd  GOOD  %s %d, func: %s\n", Ntotal, thisBlock->size, Nbytes, thisBlock->file, thisBlock->line, thisBlock->func);
     283      } else {
     284        fprintf (stderr, "  %zd  %zd  %zd  BAD   %s %d, func: %s\n", Ntotal, thisBlock->size, Nbytes, thisBlock->file, thisBlock->line, thisBlock->func);
     285      }
    282286    }
    283287
    284288    thisBlock = thisBlock->prevBlock;
    285289  }
     290  fprintf (stderr, "%zd memory blocks allocated (%zd bytes total)\n", Ntotal, Nbytes);
     291
    286292  return;
    287293}
Note: See TracChangeset for help on using the changeset viewer.