1
<!--$Id: memp_trickle.so,v 10.22 2001/05/05 01:49:16 bostic Exp $-->
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
6
<title>Berkeley DB: memp_trickle</title>
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
11
<a name="2"><!--meow--></a>
12
<table width="100%"><tr valign=top>
17
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
25
memp_trickle(DB_ENV *env, int pct, int *nwrotep);
28
<p>The memp_trickle function ensures that at least <b>pct</b> percent of
29
the pages in the shared memory pool are clean by writing dirty pages to
31
If the <b>nwrotep</b> argument is non-NULL, the number of pages that
32
were written to reach the correct percentage is returned in the memory
33
location to which it refers.
34
<p>The purpose of the memp_trickle function is to enable a memory
35
pool manager to ensure that a page is always available for reading in new
36
information without having to wait for a write.
37
<p>The memp_trickle function returns a non-zero error value on failure and 0 on success.
39
<p>The memp_trickle function may fail and return a non-zero error for the following conditions:
41
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
43
<p>The memp_trickle function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions.
44
If a catastrophic error has occurred, the memp_trickle function may fail and return
45
<a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>, in which case all subsequent Berkeley DB calls will fail
48
<a href="../api_c/env_set_cachesize.html">DB_ENV->set_cachesize</a>,
49
<a href="../api_c/env_set_mp_mmapsize.html">DB_ENV->set_mp_mmapsize</a>,
50
<a href="../api_c/memp_fclose.html">memp_fclose</a>,
51
<a href="../api_c/memp_fget.html">memp_fget</a>,
52
<a href="../api_c/memp_fopen.html">memp_fopen</a>,
53
<a href="../api_c/memp_fput.html">memp_fput</a>,
54
<a href="../api_c/memp_fset.html">memp_fset</a>,
55
<a href="../api_c/memp_fsync.html">memp_fsync</a>,
56
<a href="../api_c/memp_register.html">memp_register</a>,
57
<a href="../api_c/memp_stat.html">memp_stat</a>,
58
<a href="../api_c/memp_sync.html">memp_sync</a>,
60
<a href="../api_c/memp_trickle.html">memp_trickle</a>.
62
<table width="100%"><tr><td><br></td><td align=right>
63
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
65
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>