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