Changeset 31593
- Timestamp:
- Jun 1, 2011, 12:00:17 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110505/Ohana/src/libohana
- Files:
-
- 3 edited
-
include/ohana.h (modified) (1 diff)
-
include/ohana_allocate.h (modified) (1 diff)
-
src/ohana_allocate.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110505/Ohana/src/libohana/include/ohana.h
r31591 r31593 20 20 21 21 // comment this out to avoid the internal Ohana memory management code 22 # define OHANA_MEMORY22 // # define OHANA_MEMORY 23 23 24 24 // 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 15 15 # ifdef OHANA_MEMORY 16 16 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);17 void *ohana_malloc (const char *file, int line, const char *func, size_t Nelem, size_t esize); 18 void *ohana_realloc (const char *file, int line, const char *func, void *in, size_t Nelem, size_t esize); 19 19 void ohana_free (const char *file, int line, const char *func, void *in); 20 20 void ohana_memdump_func (int mode); -
branches/eam_branches/ipp-20110505/Ohana/src/libohana/src/ohana_allocate.c
r31591 r31593 4 4 # include <stdint.h> 5 5 # include <pthread.h> 6 7 # undef OHANA_MEMORY 6 8 # include "ohana_allocate.h" 7 9 … … 276 278 Nbytes += thisBlock->size; 277 279 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 } 282 286 } 283 287 284 288 thisBlock = thisBlock->prevBlock; 285 289 } 290 fprintf (stderr, "%zd memory blocks allocated (%zd bytes total)\n", Ntotal, Nbytes); 291 286 292 return; 287 293 }
Note:
See TracChangeset
for help on using the changeset viewer.
