9832fd
commit 8b35e35d0f4eae28a47c23e2aa15ddf570fa86ef
9832fd
Author: Ondřej Bílka <neleai@seznam.cz>
9832fd
Date:   Fri Nov 1 15:39:26 2013 +0100
9832fd
9832fd
    Fix malloc_info statistic. Fixes bug 16112
9832fd
9832fd
diff --git a/malloc/malloc.c b/malloc/malloc.c
9832fd
index b47d99ac65344c82..c98b3f79ed38b4f0 100644
9832fd
--- a/malloc/malloc.c
9832fd
+++ b/malloc/malloc.c
9832fd
@@ -5068,23 +5068,11 @@ malloc_info (int options, FILE *fp)
9832fd
 	sizes[i].total = sizes[i].count * sizes[i].to;
9832fd
       }
9832fd
 
9832fd
-    mbinptr bin = bin_at (ar_ptr, 1);
9832fd
-    struct malloc_chunk *r = bin->fd;
9832fd
-    if (r != NULL)
9832fd
-      {
9832fd
-	while (r != bin)
9832fd
-	  {
9832fd
-	    ++sizes[NFASTBINS].count;
9832fd
-	    sizes[NFASTBINS].total += r->size;
9832fd
-	    sizes[NFASTBINS].from = MIN (sizes[NFASTBINS].from, r->size);
9832fd
-	    sizes[NFASTBINS].to = MAX (sizes[NFASTBINS].to, r->size);
9832fd
-	    r = r->fd;
9832fd
-	  }
9832fd
-	nblocks += sizes[NFASTBINS].count;
9832fd
-	avail += sizes[NFASTBINS].total;
9832fd
-      }
9832fd
 
9832fd
-    for (size_t i = 2; i < NBINS; ++i)
9832fd
+    mbinptr bin;
9832fd
+    struct malloc_chunk *r;
9832fd
+
9832fd
+    for (size_t i = 1; i < NBINS; ++i)
9832fd
       {
9832fd
 	bin = bin_at (ar_ptr, i);
9832fd
 	r = bin->fd;