calls[idx_realloc], total[idx_realloc],
calls[idx_realloc], (unsigned long long int) total[idx_realloc],
dest (void){  int percent, cnt;  unsigned long int maxcalls;  /* If we haven't done anything here just return.  */  if (not_me)    return;  /* If we should call any of the memory functions don't do any profiling.  */  not_me = true;  /* Finish the output file.  */  if (fd != -1)    {      /* Write the partially filled buffer.  */      write (fd, buffer, buffer_cnt * sizeof (struct entry));      /* Go back to the beginning of the file.  We allocated two records	 here when we opened the file.  */      lseek (fd, 0, SEEK_SET);      /* Write out a record containing the total size.  */      first.stack = peak_total;      write (fd, &first, sizeof (struct entry));      /* Write out another record containing the maximum for heap and         stack.  */      first.heap = peak_heap;      first.stack = peak_stack;      GETTIME (first.time_low, first.time_high);      write (fd, &first, sizeof (struct entry));      /* Close the file.  */      close (fd);      fd = -1;    }  /* Write a colorful statistic.  */  fprintf (stderr, "\n\\e[01;32mMemory usage summary:\e[0;0m heap total: %llu, heap peak: %lu, stack peak: %lu\n\\e[04;34m         total calls   total memory   failed calls\e[0m\n\\e[00;34m malloc|\e[0m %10lu   %12llu   %s%12lu\e[00;00m\n\\e[00;34mrealloc|\e[0m %10lu   %12llu   %s%12lu\e[00;00m   (in place: %ld, dec: %ld)\n\\e[00;34m calloc|\e[0m %10lu   %12llu   %s%12lu\e[00;00m\n\\e[00;34m   free|\e[0m %10lu   %12llu\n",	   grand_total, (unsigned long int) peak_heap,	   (unsigned long int) peak_stack,	   calls[idx_malloc], total[idx_malloc],	   failed[idx_malloc] ? "\e[01;41m" : "", failed[idx_malloc],	   calls[idx_realloc], total[idx_realloc],	   failed[idx_realloc] ? "\e[01;41m" : "", failed[idx_realloc],	   inplace, decreasing,	   calls[idx_calloc], total[idx_calloc],	   failed[idx_calloc] ? "\e[01;41m" : "", failed[idx_calloc],	   calls[idx_free], total[idx_free]);  if (trace_mmap)    fprintf (stderr, "\\e[00;34mmmap(r)|\e[0m %10lu   %12llu   %s%12lu\e[00;00m\n\\e[00;34mmmap(w)|\e[0m %10lu   %12llu   %s%12lu\e[00;00m\n\\e[00;34mmmap(a)|\e[0m %10lu   %12llu   %s%12lu\e[00;00m\n\\e[00;34m mremap|\e[0m %10lu   %12llu   %s%12lu\e[00;00m   (in place: %ld, dec: %ld)\n\\e[00;34m munmap|\e[0m %10lu   %12llu   %s%12lu\e[00;00m\n",	     calls[idx_mmap_r], total[idx_mmap_r],	     failed[idx_mmap_r] ? "\e[01;41m" : "", failed[idx_mmap_r],	     calls[idx_mmap_w], total[idx_mmap_w],	     failed[idx_mmap_w] ? "\e[01;41m" : "", failed[idx_mmap_w],	     calls[idx_mmap_a], total[idx_mmap_a],	     failed[idx_mmap_a] ? "\e[01;41m" : "", failed[idx_mmap_a],	     calls[idx_mremap], total[idx_mremap],	     failed[idx_mremap] ? "\e[01;41m" : "", failed[idx_mremap],	     inplace_mremap, decreasing_mremap,	     calls[idx_munmap], total[idx_munmap],	     failed[idx_munmap] ? "\e[01;41m" : "", failed[idx_munmap]);  /* Write out a histoogram of the sizes of the allocations.  */  fprintf (stderr, "\e[01;32mHistogram for block sizes:\e[0;0m\n");  /* Determine the maximum of all calls for each size range.  */  maxcalls = large;  for (cnt = 0; cnt < 65536; cnt += 16)    if (histogram[cnt / 16] > maxcalls)      maxcalls = histogram[cnt / 16];  for (cnt = 0; cnt < 65536; cnt += 16)    /* Only write out the nonzero entries.  */    if (histogram[cnt / 16] != 0)      {	percent = (histogram[cnt / 16] * 100) / calls_total;	fprintf (stderr, "%5d-%-5d%12lu ", cnt, cnt + 15,		 histogram[cnt / 16]);	if (percent == 0)	  fputs (" <1% \e[41;37m", stderr);	else	  fprintf (stderr, "%3d%% \e[41;37m", percent);	/* Draw a bar with a length corresponding to the current           percentage.  */	percent = (histogram[cnt / 16] * 50) / maxcalls;	while (percent-- > 0)	  fputc ('=', stderr);	 fputs ("\e[0;0m\n", stderr);      }  if (large != 0)    {      percent = (large * 100) / calls_total;      fprintf (stderr, "   large   %12lu ", large);      if (percent == 0)	fputs (" <1% \e[41;37m", stderr);      else	fprintf (stderr, "%3d%% \e[41;37m", percent);      percent = (large * 50) / maxcalls;      while (percent-- > 0)        fputc ('=', stderr);      fputs ("\e[0;0m\n", stderr);    }}