-/* $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"
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;
{
}
-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