1<!--$Id: mempfile_class.so,v 10.24 2004/08/13 03:38:58 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB: DB_MPOOLFILE</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<table width="100%"><tr valign=top> 12<td> 13<b>DB_MPOOLFILE</b> 14</td> 15<td align=right> 16<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a> 17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td> 18</tr></table> 19<hr size=1 noshade> 20<tt> 21<b><pre> 22#include <db.h> 23<p> 24typedef struct __db_mpoolfile DB_MPOOLFILE; 25</pre></b> 26<hr size=1 noshade> 27<b>Description: DB_MPOOLFILE</b> 28<p>The memory pool interfaces for the Berkeley DB database environment are 29methods of the <a href="../api_c/env_class.html">DB_ENV</a> handle. The <a href="../api_c/env_class.html">DB_ENV</a> memory pool 30methods and the DB_MPOOLFILE class provide general-purpose, 31page-oriented buffer management of files. Although designed to work 32with the other <a href="../api_c/db_class.html">DB</a> classes, they are also useful for more general 33purposes. The memory pools are referred to in this document as simply 34<i>pools</i>.</p> 35<p>Pools may be shared between processes. Pools are usually filled by 36pages from one or more files. Pages in the pool are replaced in LRU 37(least-recently-used) order, with each new page replacing the page that 38has been unused the longest. Pages retrieved from the pool using 39<a href="../api_c/memp_fget.html">DB_MPOOLFILE->get</a> are <i>pinned</i> in the pool until they are 40returned to the control of the buffer pool using the <a href="../api_c/memp_fput.html">DB_MPOOLFILE->put</a> 41method.</p> 42<p>The DB_MPOOLFILE object is the handle for a file in the memory 43pool. The handle is not free-threaded. Once the <a href="../api_c/memp_fclose.html">DB_MPOOLFILE->close</a> method 44is called, the handle may not be accessed again, regardless of that 45method's return.</p> 46<hr size=1 noshade> 47<br><b>Class</b> 48<a href="../api_c/env_class.html">DB_ENV</a>, DB_MPOOLFILE 49<br><b>See Also</b> 50<a href="../api_c/memp_list.html">Memory Pools and Related Methods</a> 51</tt> 52<table width="100%"><tr><td><br></td><td align=right> 53<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a> 54</td></tr></table> 55<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 56</body> 57</html> 58