From: wessels <> Date: Mon, 23 Jun 2003 03:31:24 +0000 (+0000) Subject: use sbrk() for high_memory_warning check if mallinfo() and mstats() X-Git-Tag: SQUID_3_0_PRE1~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=703cc8e8bfbc8415af84feff676fb74b77fa8b48;p=thirdparty%2Fsquid.git use sbrk() for high_memory_warning check if mallinfo() and mstats() are not available. --- diff --git a/src/stat.cc b/src/stat.cc index 31061bf3ad..03631a7feb 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.375 2003/06/20 01:01:01 robertc Exp $ + * $Id: stat.cc,v 1.376 2003/06/22 21:31:24 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -1089,6 +1089,9 @@ statAvgTick(void *notused) struct mallinfo mp = mallinfo(); i = mp.arena; +#elif HAVE_SBRK + + i = (size_t) ((char *) sbrk(0) - (char *) sbrk_start); #endif if (Config.warnings.high_memory < i)