Changeset 1e5cce6


Ignore:
Timestamp:
05/29/15 02:50:36 (9 years ago)
Author:
Hal Finkel <hfinkel@…>
Branches:
master
Children:
bdaf020
Parents:
493cb97
git-author:
Hal Finkel <hfinkel@…> (05/29/15 02:50:36)
git-committer:
Hal Finkel <hfinkel@…> (05/29/15 02:50:36)
Message:

no backtrace on free -- that is a waste of time/space

File:
1 edited

Legend:

Unmodified
Added
Removed
  • memlog.c

    r493cb97 r1e5cce6  
    6363} 
    6464 
    65 static void print_context(const void *caller) { 
     65static void print_context(const void *caller, int show_backtrace) { 
    6666  struct rusage usage; 
    6767  if (getrusage(RUSAGE_SELF, &usage)) { 
     
    7272  fprintf(log_file, "\t%ld.%06ld %ld %ld", usage.ru_utime.tv_sec, 
    7373          usage.ru_utime.tv_usec, usage.ru_maxrss, syscall(SYS_gettid)); 
     74 
     75  if (!show_backtrace) 
     76    return; 
    7477 
    7578  void *pcs[1024]; 
     
    141144 
    142145  fprintf(log_file, "M: %zd %p", size, ptr); 
    143   print_context(caller); 
     146  print_context(caller, 1); 
    144147  fprintf(log_file, "\n"); 
    145148 
     
    156159 
    157160  fprintf(log_file, "F: %p", ptr); 
    158   print_context(caller); 
     161  print_context(caller, 0); 
    159162  fprintf(log_file, "\n"); 
    160163 
Note: See TracChangeset for help on using the changeset viewer.