Commit 67dd25e8 authored by Per Cederqvist's avatar Per Cederqvist

end_of_atomic: Call limit_cache_size() only in 1% of the cases.

parent 1ef7e0e8
/*
* $Id: disk-end-of-atomic.c,v 0.6 1992/02/26 18:45:11 ceder Exp $
* $Id: disk-end-of-atomic.c,v 0.7 1992/04/09 09:19:43 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -36,7 +36,7 @@
* to forget old texts.
*/
static char *rcsid = "$Id: disk-end-of-atomic.c,v 0.6 1992/02/26 18:45:11 ceder Exp $";
static char *rcsid = "$Id: disk-end-of-atomic.c,v 0.7 1992/04/09 09:19:43 ceder Exp $";
#include <kom-types.h>
......@@ -51,9 +51,16 @@ long
end_of_atomic( Bool idle )
{
int timeout = TIMEOUT;
static int limit = 0;
free_tmp();
cache_limit_size();
/* FIXME-- make limit_text_stat smarter instead. */
if (limit++ > 100)
{
cache_limit_size();
limit = 0;
}
if ( idle )
if ( garb_text() == FALSE )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment