]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
call mallopt() before anything else.
authorwessels <>
Sun, 14 Jul 1996 11:35:54 +0000 (11:35 +0000)
committerwessels <>
Sun, 14 Jul 1996 11:35:54 +0000 (11:35 +0000)
src/main.cc

index e90d408b19152f5d3171fb62ecce533f87ffe2cc..2aca9ccc1296e3d512fdd48b61e0cd445350c879 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.cc,v 1.49 1996/07/11 17:42:44 wessels Exp $
+ * $Id: main.cc,v 1.50 1996/07/14 05:35:54 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -468,6 +468,22 @@ int main(argc, argv)
     time_t last_announce = 0;
     time_t loop_delay;
 
+    /* call mallopt() before anything else */
+#if HAVE_MALLOPT
+#ifdef M_GRAIN
+    /* Round up all sizes to a multiple of this */
+    mallopt(M_GRAIN, 16);
+#endif
+#ifdef M_MXFAST
+    /* biggest size that is considered a small block */
+    mallopt(M_MXFAST, 256);
+#endif
+#ifdef M_NBLKS
+    /* allocate this many small blocks at once */
+    mallopt(M_NLBLKS, 32);
+#endif
+#endif /* HAVE_MALLOPT */
+
     memset(&local_addr, '\0', sizeof(struct in_addr));
     local_addr.s_addr = inet_addr(localhost);
 
@@ -484,21 +500,6 @@ int main(argc, argv)
        for (n = FD_SETSIZE; n > 2; n--)
            close(n);
 
-#if HAVE_MALLOPT
-#ifdef M_GRAIN
-    /* Round up all sizes to a multiple of this */
-    mallopt(M_GRAIN, 16);
-#endif
-#ifdef M_MXFAST
-    /* biggest size that is considered a small block */
-    mallopt(M_MXFAST, 256);
-#endif
-#ifdef M_NBLKS
-    /* allocate this many small blocks at once */
-    mallopt(M_NLBLKS, 32);
-#endif
-#endif /* HAVE_MALLOPT */
-
     /*init comm module */
     comm_init();