]> git.ipfire.org Git - thirdparty/squid.git/commit - src/mem/Pool.h
Bypass the expensive check to the allocator getStats() when obtaining inuse data
authoradrian <>
Wed, 20 Sep 2006 06:59:26 +0000 (06:59 +0000)
committeradrian <>
Wed, 20 Sep 2006 06:59:26 +0000 (06:59 +0000)
commit9f9e06f3e0e028258a446df3b4f1f7ef2422c302
treeff086521a3a1678a6698dee8d8606ebe1d52de2f
parent3a8c65c3c1c2c344ed281c1ade9e00cbfcba958c
Bypass the expensive check to the allocator getStats() when obtaining inuse data

A lot of busy code calls getStats() to get the inuse values when calculating
queue length (diskthreads) and store memory use for object memory expiry.
This was destroying performance.

The changes implement a "shortcut" to obtain the inuse values for both the
malloc and mempool allocator. getStats() is still expensive for mempools
(as it does GC before updating all the statistics to get accurate information)
but code has been modified to not use getStats() where all it wanted was
inuse info.
include/MemPool.h
lib/MemPool.cc
src/MemObject.cc
src/mem_node.cc
src/store.cc