• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/db-4.7.25.NC/docs/ref/upgrade.4.0/
1<!--$Id: mp.so,v 1.4 2007/04/05 21:19:31 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 Reference Guide: Release 4.0: memp_XXX</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><b><dl><dt>Berkeley DB Reference Guide:<dd>Upgrading Berkeley DB Applications</dl></b></td>
13<td align=right><a href="../upgrade.4.0/log.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../upgrade.4.0/txn.html"><img src="../../images/next.gif" alt="Next"></a>
14</td></tr></table>
15<p align=center><b>Release 4.0: memp_XXX</b></p>
16<p>The C API for the Berkeley DB Memory Pool subsystem was reworked in the 4.0
17release as follows:</p>
18<table border=1 align=center>
19<tr><th>Historic functional interface</th><th>Berkeley DB 4.X method</th></tr>
20<tr><td>memp_register</td><td><a href="../../api_c/memp_register.html">DB_ENV-&gt;memp_register</a></td></tr>
21<tr><td>memp_stat</td><td><a href="../../api_c/memp_stat.html">DB_ENV-&gt;memp_stat</a></td></tr>
22<tr><td>memp_sync</td><td><a href="../../api_c/memp_sync.html">DB_ENV-&gt;memp_sync</a></td></tr>
23<tr><td>memp_trickle</td><td><a href="../../api_c/memp_trickle.html">DB_ENV-&gt;memp_trickle</a></td></tr>
24<tr><td>memp_fopen</td><td><a href="../../api_c/memp_fcreate.html">DB_ENV-&gt;memp_fcreate</a></td></tr>
25<tr><td>DB_MPOOL_FINFO: ftype</td><td><a href="../../api_c/memp_set_ftype.html">DB_MPOOLFILE-&gt;set_ftype</a></td></tr>
26<tr><td>DB_MPOOL_FINFO: pgcookie</td><td><a href="../../api_c/memp_set_pgcookie.html">DB_MPOOLFILE-&gt;set_pgcookie</a></td></tr>
27<tr><td>DB_MPOOL_FINFO: fileid</td><td><a href="../../api_c/memp_set_fileid.html">DB_MPOOLFILE-&gt;set_fileid</a></td></tr>
28<tr><td>DB_MPOOL_FINFO: lsn_offset</td><td><a href="../../api_c/memp_set_lsn_offset.html">DB_MPOOLFILE-&gt;set_lsn_offset</a></td></tr>
29<tr><td>DB_MPOOL_FINFO: clear_len</td><td><a href="../../api_c/memp_set_clear_len.html">DB_MPOOLFILE-&gt;set_clear_len</a></td></tr>
30<tr><td>memp_fopen</td><td><a href="../../api_c/memp_fopen.html">DB_MPOOLFILE-&gt;open</a></td></tr>
31<tr><td>memp_fclose</td><td><a href="../../api_c/memp_fclose.html">DB_MPOOLFILE-&gt;close</a></td></tr>
32<tr><td>memp_fput</td><td><a href="../../api_c/memp_fput.html">DB_MPOOLFILE-&gt;put</a></td></tr>
33<tr><td>memp_fset</td><td>DB_MPOOLFILE-&gt;set</td></tr>
34<tr><td>memp_fsync</td><td><a href="../../api_c/memp_fsync.html">DB_MPOOLFILE-&gt;sync</a></td></tr>
35</table>
36<p>Applications calling any of the memp_register, memp_stat, memp_sync or
37memp_trickle functions should update those calls to use the enclosing
38<a href="../../api_c/env_class.html">DB_ENV</a> handle's method (easily done as the first argument to the
39existing call is the correct <a href="../../api_c/env_class.html">DB_ENV</a> handle).</p>
40<p>In addition, the <a href="../../api_c/memp_stat.html">DB_ENV-&gt;memp_stat</a> call has been changed in the 4.0
41release to take a flags argument.  To leave their historic behavior
42unchanged, applications should add a final argument of 0 to any calls
43made to <a href="../../api_c/memp_stat.html">DB_ENV-&gt;memp_stat</a>.</p>
44<p>Applications calling the memp_fopen function should update those calls
45as follows: First, acquire a <a href="../../api_c/mempfile_class.html">DB_MPOOLFILE</a> handle using the
46<a href="../../api_c/memp_fcreate.html">DB_ENV-&gt;memp_fcreate</a> method.  Second, if the DB_MPOOL_FINFO structure
47reference passed to the memp_fopen function was non-NULL, call the
48<a href="../../api_c/mempfile_class.html">DB_MPOOLFILE</a> method corresponding to each initialized field in
49the DB_MPOOL_FINFO structure.  Third, call the <a href="../../api_c/memp_fopen.html">DB_MPOOLFILE-&gt;open</a> method
50method to open the underlying file.  If the <a href="../../api_c/memp_fopen.html">DB_MPOOLFILE-&gt;open</a> method call
51fails, then <a href="../../api_c/memp_fclose.html">DB_MPOOLFILE-&gt;close</a> method must be called to destroy the allocated
52handle.</p>
53<p>Applications calling the memp_fopen, memp_fclose, memp_fput, memp_fset,
54or memp_fsync functions should update those calls to use the enclosing
55<a href="../../api_c/mempfile_class.html">DB_MPOOLFILE</a> handle's method.  Again, this is easily done as the
56first argument to the existing call is the correct <a href="../../api_c/mempfile_class.html">DB_MPOOLFILE</a>
57handle.  With one exception, the calling conventions of the old and new
58interfaces are identical; the one exception is the <a href="../../api_c/memp_fclose.html">DB_MPOOLFILE-&gt;close</a> method,
59which requires an additional flag parameter that should be set to 0.</p>
60<table width="100%"><tr><td><br></td><td align=right><a href="../upgrade.4.0/log.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../upgrade.4.0/txn.html"><img src="../../images/next.gif" alt="Next"></a>
61</td></tr></table>
62<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
63</body>
64</html>
65