pixmap caching
- From: mmc maruska dyndns org (Michal Maruška)
- To: John Harper <jsh unfactored org>
- Cc: sawfish-list gnome org
- Subject: pixmap caching
- Date: Fri, 18 Feb 2005 06:10:39 +0100
Is it correct, that pixmap_cache_set when removing from cache starts from
"oldest", and any usage pushes the node to the oldest ones, via
prepend_to_age_list (n);
If the cache fills up, no new nodes can "enter" (b/c they are immediately
removed, since they are marked as "oldest").
My quick solution is to use append_to_age_list instead (although i'd invert the names)
which puts a node to the "newest" extreme.
static void
append_to_age_list (pixmap_cache_node *n)
{
n->older = newest;
if (n->older != 0)
n->older->newer = n;
newest = n;
n->newer = 0;
if (oldest == 0)
oldest = n;
}
Or, maybe i have missed something.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]