]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
rearrange order of functions
authorwessels <>
Thu, 28 Mar 1996 13:10:04 +0000 (13:10 +0000)
committerwessels <>
Thu, 28 Mar 1996 13:10:04 +0000 (13:10 +0000)
src/tools.cc

index d79dbedb7077d054ac4c6f8bf07e7a80501f5ba8..f1242c5f148fe580d15f4d1318a1583f5e8257d2 100644 (file)
@@ -1,5 +1,5 @@
 
-/* $Id: tools.cc,v 1.16 1996/03/28 06:02:09 wessels Exp $ */
+/* $Id: tools.cc,v 1.17 1996/03/28 06:10:04 wessels Exp $ */
 
 #include "squid.h"
 
@@ -49,7 +49,48 @@ void print_warranty()
        puts(dead_msg());
 }
 
-int PrintRusage(f, lf)
+
+static void dumpMallocStats(f)
+     FILE *f;
+{
+#if HAVE_MALLINFO
+    struct mallinfo mp;
+
+    if (!do_mallinfo)
+       return;
+
+    mp = mallinfo();
+
+    fprintf(f, "Malloc Instrumentation via mallinfo(): \n");
+    fprintf(f, "   total space in arena  %d\n", mp.arena);
+    fprintf(f, "   number of ordinary blocks  %d\n", mp.ordblks);
+    fprintf(f, "   number of small blocks  %d\n", mp.smblks);
+    fprintf(f, "   number of holding blocks  %d\n", mp.hblks);
+    fprintf(f, "   space in holding block headers  %d\n", mp.hblkhd);
+    fprintf(f, "   space in small blocks in use  %d\n", mp.usmblks);
+    fprintf(f, "   space in free blocks  %d\n", mp.fsmblks);
+    fprintf(f, "   space in ordinary blocks in use  %d\n", mp.uordblks);
+    fprintf(f, "   space in free ordinary blocks  %d\n", mp.fordblks);
+    fprintf(f, "   cost of enabling keep option  %d\n", mp.keepcost);
+#if LNG_MALLINFO
+    fprintf(f, "   max size of small blocks  %d\n", mp.mxfast);
+    fprintf(f, "   number of small blocks in a holding block  %d\n",
+       mp.nlblks);
+    fprintf(f, "   small block rounding factor  %d\n", mp.grain);
+    fprintf(f, "   space (including overhead) allocated in ord. blks  %d\n",
+       mp.uordbytes);
+    fprintf(f, "   number of ordinary blocks allocated  %d\n",
+       mp.allocated);
+    fprintf(f, "   bytes used in maintaining the free tree  %d\n",
+       mp.treeoverhead);
+#endif /* LNG_MALLINFO */
+
+#if PRINT_MMAP
+    mallocmap();
+#endif /* PRINT_MMAP */
+#endif /* HAVE_MALLINFO */
+}
+static int PrintRusage(f, lf)
      void (*f) ();
      FILE *lf;
 {
@@ -151,47 +192,6 @@ void fatal_dump(message)
 }
 
 
-void dumpMallocStats(f)
-     FILE *f;
-{
-#if HAVE_MALLINFO
-    struct mallinfo mp;
-
-    if (!do_mallinfo)
-       return;
-
-    mp = mallinfo();
-
-    fprintf(f, "Malloc Instrumentation via mallinfo(): \n");
-    fprintf(f, "   total space in arena  %d\n", mp.arena);
-    fprintf(f, "   number of ordinary blocks  %d\n", mp.ordblks);
-    fprintf(f, "   number of small blocks  %d\n", mp.smblks);
-    fprintf(f, "   number of holding blocks  %d\n", mp.hblks);
-    fprintf(f, "   space in holding block headers  %d\n", mp.hblkhd);
-    fprintf(f, "   space in small blocks in use  %d\n", mp.usmblks);
-    fprintf(f, "   space in free blocks  %d\n", mp.fsmblks);
-    fprintf(f, "   space in ordinary blocks in use  %d\n", mp.uordblks);
-    fprintf(f, "   space in free ordinary blocks  %d\n", mp.fordblks);
-    fprintf(f, "   cost of enabling keep option  %d\n", mp.keepcost);
-#if LNG_MALLINFO
-    fprintf(f, "   max size of small blocks  %d\n", mp.mxfast);
-    fprintf(f, "   number of small blocks in a holding block  %d\n",
-       mp.nlblks);
-    fprintf(f, "   small block rounding factor  %d\n", mp.grain);
-    fprintf(f, "   space (including overhead) allocated in ord. blks  %d\n",
-       mp.uordbytes);
-    fprintf(f, "   number of ordinary blocks allocated  %d\n",
-       mp.allocated);
-    fprintf(f, "   bytes used in maintaining the free tree  %d\n",
-       mp.treeoverhead);
-#endif /* LNG_MALLINFO */
-
-#if PRINT_MMAP
-    mallocmap();
-#endif /* PRINT_MMAP */
-#endif /* HAVE_MALLINFO */
-}
-
 int getHeapSize()
 {
 #if HAVE_MALLINFO