Imported Upstream version 5.3.21
[platform/upstream/libdb.git] / docs / api_reference / CXX / mempset_maxsize.html
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">
4   <head>
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()" />
13   </head>
14   <body>
15     <div xmlns="" class="navheader">
16       <div class="libver">
17         <p>Library Version 11.2.5.3</p>
18       </div>
19       <table width="100%" summary="Navigation header">
20         <tr>
21           <th colspan="3" align="center">DbMpoolFile::set_maxsize()</th>
22         </tr>
23         <tr>
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
27         </th>
28           <td width="20%" align="right"> <a accesskey="n" href="mempset_pgcookie.html">Next</a></td>
29         </tr>
30       </table>
31       <hr />
32     </div>
33     <div class="sect1" lang="en" xml:lang="en">
34       <div class="titlepage">
35         <div>
36           <div>
37             <h2 class="title" style="clear: both"><a id="mempset_maxsize"></a>DbMpoolFile::set_maxsize()</h2>
38           </div>
39         </div>
40       </div>
41       <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbMpoolFile::set_maxsize(u_int32_t gbytes, u_int32_t bytes); </pre>
45       <p>
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.
48     </p>
49       <p>
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.
56     </p>
57       <p>
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.
61     </p>
62       <p>
63          The <code class="methodname">DbMpoolFile::set_maxsize()</code> method may be called at any time
64          during the life of the application.
65     </p>
66       <p>
67          The <code class="methodname">DbMpoolFile::set_maxsize()</code> <span>
68             
69             <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.
73             </span>
74         </span>
75     </p>
76       <div class="sect2" lang="en" xml:lang="en">
77         <div class="titlepage">
78           <div>
79             <div>
80               <h3 class="title"><a id="idp3726736"></a>Parameters</h3>
81             </div>
82           </div>
83         </div>
84         <div class="sect3" lang="en" xml:lang="en">
85           <div class="titlepage">
86             <div>
87               <div>
88                 <h4 class="title"><a id="idp3726088"></a>bytes</h4>
89               </div>
90             </div>
91           </div>
92           <p>
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>.
94                      </p>
95         </div>
96         <div class="sect3" lang="en" xml:lang="en">
97           <div class="titlepage">
98             <div>
99               <div>
100                 <h4 class="title"><a id="idp3712992"></a>gbytes</h4>
101               </div>
102             </div>
103           </div>
104           <p>
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>.
106                      </p>
107         </div>
108       </div>
109       <div class="sect2" lang="en" xml:lang="en">
110         <div class="titlepage">
111           <div>
112             <div>
113               <h3 class="title"><a id="idp3718064"></a>Class</h3>
114             </div>
115           </div>
116         </div>
117         <p>
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> 
119             </p>
120       </div>
121       <div class="sect2" lang="en" xml:lang="en">
122         <div class="titlepage">
123           <div>
124             <div>
125               <h3 class="title"><a id="idp3731656"></a>See Also</h3>
126             </div>
127           </div>
128         </div>
129         <p>
130                      <a class="xref" href="memp.html#memplist" title="Memory Pools and Related Methods">Memory Pools and Related Methods</a> 
131                 </p>
132       </div>
133     </div>
134     <div class="navfooter">
135       <hr />
136       <table width="100%" summary="Navigation footer">
137         <tr>
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>
141           </td>
142           <td width="40%" align="right"> <a accesskey="n" href="mempset_pgcookie.html">Next</a></td>
143         </tr>
144         <tr>
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>
148           </td>
149           <td width="40%" align="right" valign="top"> DbMpoolFile::set_pgcookie()</td>
150         </tr>
151       </table>
152     </div>
153   </body>
154 </html>