]> git.ipfire.org Git - thirdparty/squid.git/commit
Stop zeroing huge memAllocBuf() buffers (#1592)
authorAmos Jeffries <yadij@users.noreply.github.com>
Wed, 13 Dec 2023 18:51:47 +0000 (18:51 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 13 Dec 2023 18:51:59 +0000 (18:51 +0000)
commit250fd42dff395fd003b122fe6d1b3ab87ff50b93
tree656f0f8e97dd2088d645ca7de12dba28e001bd6c
parentab2acef61068dea8bd22e39f2d9643b08b3bf7a6
Stop zeroing huge memAllocBuf() buffers (#1592)

memAllocBuf() buffers smaller than 64KB were not zeroed before this
change. Larger buffers (a.k.a. "huge buffers") were zeroed with
xcalloc(). We believe it is safe to stop zeroing those huge buffers
because all known code that allocates huge buffers also allocates
smaller ones for the same purpose. If some of that code relied on
zeroing for years, we would expect to see problems with smaller buffers.

Removing xcalloc() allows removal of mem*Rigid(), memBufStats() and all
string pools API complications.

The cache manager mgr:mem report section for string
statistics is also removed.
src/esi/VarState.cc
src/mem/PoolingAllocator.h
src/mem/forward.h
src/mem/minimal.cc
src/mem/old_api.cc
src/tests/stub_libmem.cc