httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Jacques Clar" <>
Subject Re: cvs commit: httpd-2.0/modules/experimental cache_cache.cmod_mem_cache.c
Date Wed, 10 Dec 2003 14:44:40 GMT
>The only thing I don't understand is why this went from:
>- queue_clock - mobj->total_refs
>queue_clock - mobj->total_refs
>When the other case negated the whole statement.  Is this intentional
>did you forget to account for the - in this case being distributed
>the ()'s?

If you look at the patch in cache_cache.c, the value of queue_clock
now either be 0 or negative because the stored priority is negative:
           priority = c->get_pri(ejected);
  -        if (c->queue_clock < priority)
  +        if (c->queue_clock > priority)
               c->queue_clock = priority;

And we want to have this value added as a it is to the number of 
reference to and object in order to increase the priority on the
negative side.
The new cached element will then have a value at least equal to the
that was removed from the heap.


View raw message