Changeset 516 for trunk/src/dnmalloc.c


Ignore:
Timestamp:
Oct 31, 2016, 8:31:24 PM (5 years ago)
Author:
katerina
Message:

Fix for ticket #409 and #410 (unprivileged suidcheck and gcc 6.2 compiler warnings).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/dnmalloc.c

    r481 r516  
    52965296{
    52975297  mstate av = get_malloc_state();
    5298   struct mallinfo mi;
     5298  static struct mallinfo mi;
    52995299  unsigned int i;
    53005300  mbinptr b;
     
    53125312  check_malloc_state();
    53135313
     5314  if (!av || av->top == 0) {
     5315    return mi;
     5316  }
     5317 
    53145318  /* Account for top */
    53155319  avail = chunksize(av->top);
     
    53625366          (CHUNK_SIZE_T)(HASHTABLESIZE / (1024*1024)));
    53635367  fprintf(stderr, "max system bytes = %10lu\n",
    5364           (CHUNK_SIZE_T)(mi.usmblks));
     5368          (CHUNK_SIZE_T)(mi.usmblks));
    53655369  fprintf(stderr, "system bytes     = %10lu  (%10lu sbrked, %10lu mmaped)\n",
    5366           (CHUNK_SIZE_T)(mi.arena + mi.hblkhd),
    5367           (CHUNK_SIZE_T)(mi.arena),
    5368           (CHUNK_SIZE_T)(mi.hblkhd));
     5370          (CHUNK_SIZE_T)(mi.arena + mi.hblkhd),
     5371          (CHUNK_SIZE_T)(mi.arena),
     5372          (CHUNK_SIZE_T)(mi.hblkhd));
    53695373  fprintf(stderr, "in use bytes     = %10lu\n",
    5370           (CHUNK_SIZE_T)(mi.uordblks + mi.hblkhd));
    5371 
     5374          (CHUNK_SIZE_T)(mi.uordblks + mi.hblkhd));
    53725375}
    53735376
Note: See TracChangeset for help on using the changeset viewer.