]> git.ipfire.org Git - thirdparty/squid.git/commit
Enable string mempools to work correctly during initialization phase
authorFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 6 Apr 2011 10:40:10 +0000 (12:40 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 6 Apr 2011 10:40:10 +0000 (12:40 +0200)
commitb5a644fcdfcce5b105eb736e028542d273b65f1c
tree2f73690c238d1c06c28d8440302ca4500e7e47a4
parenta119c6adbd3db6e2abde97a142ec40ae865648b4
Enable string mempools to work correctly during initialization phase

Makes string mempools work before Mem::Init() was called, as may happen
during global variable initialization or early main.cc processing. If
needed, strings allocated before the Mem::Init() call are given an extra
buffer space to make sure the allocated buffer size will not match any
string pool size during deallocation.
Shortcomings: We now waste RAM on buffer increase for early allocated
strings unless they are already bigger than the maximum supported string
pool size. Statistics for early allocations are broken. Non-string
mempools still do not support early allocations.
src/mem.cc