From: hno <> Date: Tue, 17 Jul 2001 16:35:46 +0000 (+0000) Subject: Limit memory used for select() statistics. It was allocating space for X-Git-Tag: SQUID_3_0_PRE1~1462 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49bc21c84cd32c96a1b2310e3b004d0e5075054c;p=thirdparty%2Fsquid.git Limit memory used for select() statistics. It was allocating space for up to SQUID_MAXFD active filedescriptors per select(), but we are only interested in a much smaller range. This statistics could use quite a bit of memory when SQUID_MAXFD is large (think I measured something like 8MB for 16K filedescriptors) --- diff --git a/src/stat.cc b/src/stat.cc index 62fab338a1..067dd6aa7e 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.346 2001/05/27 23:13:43 hno Exp $ + * $Id: stat.cc,v 1.347 2001/07/17 10:35:46 hno Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -986,7 +986,7 @@ statCountersInitSpecial(StatCounters * C) statHistEnumInit(&C->comm_icp_incoming, INCOMING_ICP_MAX); statHistEnumInit(&C->comm_dns_incoming, INCOMING_DNS_MAX); statHistEnumInit(&C->comm_http_incoming, INCOMING_HTTP_MAX); - statHistIntInit(&C->select_fds_hist, SQUID_MAXFD); + statHistIntInit(&C->select_fds_hist, 256); /* was SQUID_MAXFD, but it is way too much. It is OK to crop this statistics */ } /* add special cases here as they arrive */