On 2013-03-26 05:50:22, Marwan Tanager wrote:
> This patch implements a page cache that is invalidated in a LRU fashion. 
> Pages are added to the cache as soon as they become visible. When the cache 
> is 
> full and a new page that isn't in the cache becomes visible, the least 
> recently 
> viewed page in the cache is evicted from memory and the new one takes it's 
> place.
> The cache size is configurable using the page-cache-size configuration 
> variable, with a default value of 15 pages. Very large values for the cache 
> size are not recommended, though, as it will stress the system memory out.
> The old periodic page reclaiming code is no longer necessary with this patch, 
> so I removed it.

Thanks. I've applied it with an additional check if the user-specified page
size is positive. (Just in case someone thinks -1 is a good cache size
and the code would allocate an array of INT_MAX integers).

Sebastian Ramacher
zathura mailing list

Reply via email to