From: wessels <> Date: Sun, 14 Jul 1996 11:35:54 +0000 (+0000) Subject: call mallopt() before anything else. X-Git-Tag: SQUID_3_0_PRE1~6065 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7328e8899a0745bfc9279f9ecef42fbfe55aca7c;p=thirdparty%2Fsquid.git call mallopt() before anything else. --- diff --git a/src/main.cc b/src/main.cc index e90d408b19..2aca9ccc12 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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();