Changeset adcd737 in git


Ignore:
Timestamp:
May 22, 2017, 12:14:09 PM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
fa22321438713e0e4dad2e822fab3a76f8cd140f
Parents:
aa8a7e160995098738e53c8327b17ceaa9adf723
Message:
omalloc: fprintf -> fputs, fputc
Location:
omalloc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • omalloc/omBin.c

    raa8a7e radcd737  
    663663  if (track)
    664664  {
    665     fprintf(fd, "T \t \t");
     665    fputs("T \t \t",fd);
    666666  }
    667667  else
     
    698698  omBin sticky;
    699699
    700   fprintf(fd, " SizeW\tBlocks\tUPages\tFBlocks\tUBlocks\tSticky\n");
     700  fputs(" SizeW\tBlocks\tUPages\tFBlocks\tUBlocks\tSticky\n",fd);
    701701  fflush(fd);
    702702  while (s_bin != NULL || i >= 0)
     
    748748    free_blocks += free_blocks_p;
    749749  }
    750   fprintf(fd, "----------------------------------------\n");
     750  fputs("----------------------------------------\n",fd);
    751751  fprintf(fd, "      \t      \t%ld\t%ld\t%ld\n", pages, free_blocks, used_blocks);
    752752}
  • omalloc/omDebugTrack.c

    raa8a7e radcd737  
    602602  omAssume(d_addr->track > 0);
    603603  if (max_frames <= 0) return;
    604   if (! (d_addr->flags & OM_FUSED)) return;
     604  if (! (d_addr->flags & OM_FUSED))
     605  {
     606    fputs(" freed\n",fd);
     607    return;
     608  }
    605609
    606610  if (max_frames > OM_MAX_KEPT_FRAMES) max_frames = OM_MAX_KEPT_FRAMES;
    607611
    608   fprintf(fd, " allocated at ");
     612  fputs(" allocated at ",fd);
    609613  if (! _omPrintBackTrace((void **)OM_ALLOC_FRAMES(d_addr),
    610614                          (d_addr->track > 1 ? max_frames : 0),
    611615                          fd,
    612616                          OM_FLR_ARG(d_addr->alloc_file, d_addr->alloc_line, d_addr->alloc_r)))
    613     fprintf(fd," ??");
     617    fputs(" ??",fd);
    614618  if (d_addr->track > 1)
    615619  {
    616620    if (d_addr->track > 3 && ! (d_addr->flags & OM_FUSED))
    617621    {
    618       fprintf(fd, "\n freed at ");
     622      fputs("\n freed at ",fd);
    619623      if (! _omPrintBackTrace(OM_FREE_FRAMES(d_addr),
    620624                          (d_addr->track > 4 ? max_frames : 0),
    621625                          fd,
    622626                          OM_FLR_ARG(d_addr->free_file, d_addr->free_line, d_addr->free_r)))
    623         fprintf(fd," ??");
    624     }
    625   }
    626   fprintf(fd, "\n");
     627        fputs(" ??",fd);
     628    }
     629  }
     630  fputc('\n',fd);
    627631  fflush(fd);
    628632}
  • omalloc/omError.c

    raa8a7e radcd737  
    107107      va_list ap;
    108108      va_start(ap, fmt);
    109       fprintf(stderr, ": ");
     109      fputs( ": ",stderr);
    110110      vfprintf(stderr, fmt, ap);
    111111      va_end(ap);
     
    115115    {
    116116#ifndef OM_NDEBUG
    117       fprintf(stderr, "\n occurred at: ");
     117      fputs("\n occurred at: ",stderr);
    118118      if (! _omPrintCurrentBackTrace(stderr, OM_FLR_VAL))
    119         fprintf(stderr, " ??");
     119        fputs(" ??",stderr);
    120120#endif
    121121    }
    122     fprintf(stderr, "\n");
     122    fputc('\n',stderr);
    123123    fflush(stderr);
    124124  }
  • omalloc/omStats.c

    raa8a7e radcd737  
    130130{
    131131  omUpdateInfo();
    132   fprintf(fd, "                  Current:       Max:\n");
     132  fputs("                  Current:       Max:\n",fd);
    133133  fprintf(fd, "BytesSystem:     %8ldk  %8ldk\n", om_Info.CurrentBytesSystem/1024, om_Info.MaxBytesSystem/1024);
    134134  fprintf(fd, "BytesSbrk:       %8ldk  %8ldk\n", om_Info.CurrentBytesSbrk/1024, om_Info.MaxBytesSbrk/1024);
     
    138138  fprintf(fd, "PagesAlloc:      %8ld   %8ld \n", om_Info.UsedPages, om_Info.MaxPages);
    139139  fprintf(fd, "RegionsAlloc:    %8ld   %8ld \n", om_Info.CurrentRegionsAlloc, om_Info.MaxRegionsAlloc);
    140   fprintf(fd, "                     Used:     Avail:\n");
     140  fputs("                     Used:     Avail:\n",fd);
    141141  fprintf(fd, "BytesAppl:       %8ldk  %8ldk\n", om_Info.UsedBytes/1024, om_Info.AvailBytes/1024);
    142142  fprintf(fd, "BytesMalloc:     %8ldk  %8ldk\n", om_Info.UsedBytesMalloc/1024, om_Info.AvailBytesMalloc/1024);
  • omalloc/omalloc.c

    raa8a7e radcd737  
    4242void* valloc(size_t size)
    4343{
    44   fprintf(stderr, "omalloc Warning: valloc not yet implemented\n");
     44  fputs("omalloc Warning: valloc not yet implemented\n",stderr);
    4545  fflush(NULL);
    4646  return NULL;
     
    4949void* memalign(size_t size_1, size_t size_2)
    5050{
    51   fprintf(stderr, "omalloc Warning: memalign not yet implemented\n");
     51  fputs("omalloc Warning: memalign not yet implemented\n",stderr);
    5252  fflush(NULL);
    5353  return NULL;
Note: See TracChangeset for help on using the changeset viewer.