]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
mod_cache_socache: avoid pool to heap reallocation.
authorYann Ylavic <ylavic@apache.org>
Tue, 19 Feb 2019 11:51:27 +0000 (11:51 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 19 Feb 2019 11:51:27 +0000 (11:51 +0000)
commit3b156a19e8e7346404ed88a46cd9cb6acd046b55
tree44e3afee3c9d6b8ee50ebcf96a2fb820c029ed02
parentf24b37e1327bc135c2dcfb795b56e6ca5a408508
mod_cache_socache: avoid pool to heap reallocation.

Below some threshold, the previous code tried free (sub-)pooled memory ASAP by
moving small buffers (< capacity / 2) to a heap bucket. But this is not really
an optimization because first it requires at some point to allocate more than
the configured capacity, and second since this happens during response handling
the pool is about to be destroyed soon anymay.

This commit simply keeps the data in the subpool and uses a pool bucket for the
output brigade to take care of the lifetime until it's consumed (or not).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1853874 13f79535-47bb-0310-9956-ffa450edef68
modules/cache/mod_cache_socache.c