Changeset 38686
- Timestamp:
- Aug 28, 2015, 9:10:35 AM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150625/Ohana/src/libohana
- Files:
-
- 2 edited
-
include/ohana_allocate.h (modified) (1 diff)
-
src/ohana_allocate.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150625/Ohana/src/libohana/include/ohana_allocate.h
r38630 r38686 110 110 # endif /* OHANA_MEMORY */ 111 111 112 void ohana_memdump_file (FILE *f, int mode); 113 112 114 # endif /* OHANA_ALLOCATE */ -
branches/eam_branches/ipp-20150625/Ohana/src/libohana/src/ohana_allocate.c
r38616 r38686 424 424 } 425 425 426 void ohana_memdump_f unc (int VERBOSE) {426 void ohana_memdump_file (FILE *f, int VERBOSE) { 427 427 428 428 if (!lastBlock) { 429 if (VERBOSE) fprintf ( stderr, "no memory allocated\n");429 if (VERBOSE) fprintf (f, "no memory allocated\n"); 430 430 return; 431 431 } … … 436 436 size_t Nbytes = 0; 437 437 438 fprintf ( stderr, " entry | bytes | cumulative | STATUS | file | line | function\n");438 fprintf (f, " entry | bytes | cumulative | STATUS | file | line | function\n"); 439 439 440 440 while (thisBlock) { … … 456 456 if (Ntotal < 100) { 457 457 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); 459 459 } 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); 461 461 } 462 462 } … … 466 466 467 467 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 474 void ohana_memdump_func (int VERBOSE) { 475 ohana_memdump_file (stderr, VERBOSE); 471 476 return; 472 477 }
Note:
See TracChangeset
for help on using the changeset viewer.
