]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
use sbrk() for high_memory_warning check if mallinfo() and mstats()
authorwessels <>
Mon, 23 Jun 2003 03:31:24 +0000 (03:31 +0000)
committerwessels <>
Mon, 23 Jun 2003 03:31:24 +0000 (03:31 +0000)
are not available.

src/stat.cc

index 31061bf3ad8aaa4594c487be42423f1430422c73..03631a7feb9ab0a634196f72d5d403cc85314a78 100644 (file)
@@ -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)