X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpagecache.c;h=6a2643dfae7547caceae0098ec926b076fd8f141;hb=2771551e0dbfc9517ca6fd68f0db362434ceddbb;hp=e987a5fead8da24d795b5c2d8f6a062b695bcb15;hpb=a105d23e73da565eff2d62c5ea0f479cf5bafe2c;p=libucw.git diff --git a/lib/pagecache.c b/lib/pagecache.c index e987a5fe..6a2643df 100644 --- a/lib/pagecache.c +++ b/lib/pagecache.c @@ -2,6 +2,9 @@ * Sherlock Library -- File Page Cache * * (c) 1999--2002 Martin Mares + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ #include "lib/lib.h" @@ -13,6 +16,7 @@ #include #include #include +#include struct page_cache { list free_pages; /* LRU queue of free non-dirty pages */ @@ -139,7 +143,7 @@ static void flush_pages(struct page_cache *c, uns force) { uns cnt = 0; - uns max = force ? ~0U : c->free_count / 2; /* FIXME: Needs tuning */ + uns max = force ? ~0U : c->free_count / 2; uns i; struct page *p, *q, **req, **rr; @@ -339,7 +343,7 @@ pgc_put(struct page_cache *c, struct page *p) else { rem_node(&p->hn); - free(p); + xfree(p); c->total_count--; } }