httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Jacques Clar" <>
Subject Q?, BUG:[mod_mem_cache] size & object count
Date Tue, 28 Oct 2003 18:30:48 GMT
Looking at two pairs of fields used to keep the current cache size and
object count:
from struct: 
mem_cache_conf (mod_mem_cache.c): 
apr_size_t cache_size 
apr_size_t object_cnt
cache_cache_t (cache_cache.c): 
apr_size_t current_size
cache_pqueue_t (cache_pqueue.c):
apr_size_t size (-1, element 0 does not count)
The two pair of fields ((cache_size - current_size) & (object_cnt -
size)) must be keep in sync in every case.
Is that a true statement?
There is at least one case, where it is not happening:
cache_cache.c, cache_insert() ->ejecting one of the entity.
c->current_size and the queue size are adjusted inside the while loop,
the cache_size and object_cnt fields are never adjusted down in
cache_size and object_cnt are not used inside any logic.
My questions are:
Should they be keep in sync (probably using memcache_cache_free())?
Should they just be removed if they don't have any usage?
This is a minor but annoying bug.
Thank you,

View raw message