1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>DbMpoolFile::set_maxsize()</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" />
10 <link rel="up" href="memp.html" title="Chapter 9. The DbMpoolFile Handle" />
11 <link rel="prev" href="mempset_lsn_offset.html" title="DbMpoolFile::set_lsn_offset()" />
12 <link rel="next" href="mempset_pgcookie.html" title="DbMpoolFile::set_pgcookie()" />
15 <div xmlns="" class="navheader">
17 <p>Library Version 11.2.5.3</p>
19 <table width="100%" summary="Navigation header">
21 <th colspan="3" align="center">DbMpoolFile::set_maxsize()</th>
24 <td width="20%" align="left"><a accesskey="p" href="mempset_lsn_offset.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 9.
26 The DbMpoolFile Handle
28 <td width="20%" align="right"> <a accesskey="n" href="mempset_pgcookie.html">Next</a></td>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
37 <h2 class="title" style="clear: both"><a id="mempset_maxsize"></a>DbMpoolFile::set_maxsize()</h2>
41 <pre class="programlisting">#include <db_cxx.h>
44 DbMpoolFile::set_maxsize(u_int32_t gbytes, u_int32_t bytes); </pre>
46 Set the maximum size for the file to be <span class="bold"><strong>gbytes</strong></span> gigabytes plus <span class="bold"><strong>bytes</strong></span>. Attempts to allocate new pages in the
47 file after the limit has been reached will fail.
50 To set the maximum file size for a particular database, call the
51 <code class="methodname">DbMpoolFile::set_maxsize()</code> method using the
52 <a class="link" href="memp.html" title="Chapter 9. The DbMpoolFile Handle">DbMpoolFile</a> handle stored
53 in the <span class="bold"><strong>mpf</strong></span> field of the
54 <a class="link" href="db.html" title="Chapter 2. The Db Handle">Db</a> handle. Attempts to insert
55 new items into the database after the limit has been reached may fail.
58 The <code class="methodname">DbMpoolFile::set_maxsize()</code> method configures a file in the
59 cache, not only operations performed using the specified
60 <a class="link" href="memp.html" title="Chapter 9. The DbMpoolFile Handle">DbMpoolFile</a> handle.
63 The <code class="methodname">DbMpoolFile::set_maxsize()</code> method may be called at any time
64 during the life of the application.
67 The <code class="methodname">DbMpoolFile::set_maxsize()</code> <span>
70 method either returns a non-zero error value or throws an
71 exception that encapsulates a non-zero error value on
72 failure, and returns 0 on success.
76 <div class="sect2" lang="en" xml:lang="en">
77 <div class="titlepage">
80 <h3 class="title"><a id="idp3726736"></a>Parameters</h3>
84 <div class="sect3" lang="en" xml:lang="en">
85 <div class="titlepage">
88 <h4 class="title"><a id="idp3726088"></a>bytes</h4>
93 The maximum size of the file is set to <span class="bold"><strong>gbytes</strong></span> gigabytes plus <span class="bold"><strong>bytes</strong></span>.
96 <div class="sect3" lang="en" xml:lang="en">
97 <div class="titlepage">
100 <h4 class="title"><a id="idp3712992"></a>gbytes</h4>
105 The maximum size of the file is set to <span class="bold"><strong>gbytes</strong></span> gigabytes plus <span class="bold"><strong>bytes</strong></span>.
109 <div class="sect2" lang="en" xml:lang="en">
110 <div class="titlepage">
113 <h3 class="title"><a id="idp3718064"></a>Class</h3>
118 <a class="link" href="env.html" title="Chapter 5. The DbEnv Handle">DbEnv</a>, <a class="link" href="memp.html" title="Chapter 9. The DbMpoolFile Handle">DbMpoolFile</a>
121 <div class="sect2" lang="en" xml:lang="en">
122 <div class="titlepage">
125 <h3 class="title"><a id="idp3731656"></a>See Also</h3>
130 <a class="xref" href="memp.html#memplist" title="Memory Pools and Related Methods">Memory Pools and Related Methods</a>
134 <div class="navfooter">
136 <table width="100%" summary="Navigation footer">
138 <td width="40%" align="left"><a accesskey="p" href="mempset_lsn_offset.html">Prev</a> </td>
139 <td width="20%" align="center">
140 <a accesskey="u" href="memp.html">Up</a>
142 <td width="40%" align="right"> <a accesskey="n" href="mempset_pgcookie.html">Next</a></td>
145 <td width="40%" align="left" valign="top">DbMpoolFile::set_lsn_offset() </td>
146 <td width="20%" align="center">
147 <a accesskey="h" href="index.html">Home</a>
149 <td width="40%" align="right" valign="top"> DbMpoolFile::set_pgcookie()</td>