Debian Codegraph @

docs/api_reference/CXX/dbset_heapsize.html

raw symbols SCIP
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>Db::set_heapsize()</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="db.html" title="Chapter 2.  The Db Handle" />
11 <link rel="prev" href="dbset_h_nelem.html" title="Db::set_h_nelem()" />
12 <link rel="next" href="dbset_heap_regionsize.html" title="Db::set_heap_regionsize()" />
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">Db::set_heapsize()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="dbset_h_nelem.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 2. 
26 The Db Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="dbset_heap_regionsize.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="dbset_heapsize"></a>Db::set_heapsize()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 Db::set_heapsize(u_int32_t gbytes, u_int32_t bytes, u_int32_t flags);</pre>
45 <p>
46 Sets the maximum on-disk database file size used by a database
47 configured to use the Heap access method. If this method is never
48 called, the database's file size can grow without bound. If this
49 method is called, then the heap file can never grow larger than the
50 limit defined by this method. In that case, attempts to update or
51 create records in a Heap database that has reached its maximum size
52 will result in a <code class="literal">DB_HEAP_FULL</code> error return.
53 </p>
54 <p>
55 The size specified to this method must be at least three times the
56 database page size. That is, a Heap database must contain at least
57 three database pages. You can set the database page size using the
58 <a class="xref" href="dbset_pagesize.html" title="Db::set_pagesize()">Db::set_pagesize()</a>
59 method.
60 </p>
61 <p>
62 The <code class="methodname">Db::set_heapsize()</code> method may not be
63 called after the <a class="xref" href="dbopen.html" title="Db::open()">Db::open()</a>
64 method is called. Further, if this method is called on an existing
65 Heap database, the size specified here must match the size used to
66 create the database. Note, however, that specifying an incorrect
67 size to this method will not result in an error return
68 (<code class="literal">EINVAL</code>) until the database is opened.
69 </p>
70 <p>
71 The <code class="methodname">Db::set_heapsize()</code> <span>
72
73 <span>
74 method either returns a non-zero error value or throws an
75 exception that encapsulates a non-zero error value on
76 failure, and returns 0 on success.
77 </span>
78 </span>
79 </p>
80 <div class="sect2" lang="en" xml:lang="en">
81 <div class="titlepage">
82 <div>
83 <div>
84 <h3 class="title"><a id="idp5652792"></a>Parameters</h3>
85 </div>
86 </div>
87 </div>
88 <div class="sect3" lang="en" xml:lang="en">
89 <div class="titlepage">
90 <div>
91 <div>
92 <h4 class="title"><a id="idp5652640"></a>gbytes</h4>
93 </div>
94 </div>
95 </div>
96 <p>
97 The size of the heap is set to <span class="bold"><strong>gbytes</strong></span> gigabytes plus <span class="bold"><strong>bytes</strong></span>.
98 </p>
99 </div>
100 <div class="sect3" lang="en" xml:lang="en">
101 <div class="titlepage">
102 <div>
103 <div>
104 <h4 class="title"><a id="idp5640896"></a>bytes</h4>
105 </div>
106 </div>
107 </div>
108 <p>
109 The size of the heap is set to <span class="bold"><strong>gbytes</strong></span> gigabytes plus <span class="bold"><strong>bytes</strong></span>.
110 </p>
111 </div>
112 <div class="sect3" lang="en" xml:lang="en">
113 <div class="titlepage">
114 <div>
115 <div>
116 <h4 class="title"><a id="idp5651648"></a>flags</h4>
117 </div>
118 </div>
119 </div>
120 <p>
121 The <span class="bold"><strong>flags</strong></span> parameter is currently
122 unused, and must be set to 0.
123 </p>
124 </div>
125 </div>
126 <div class="sect2" lang="en" xml:lang="en">
127 <div class="titlepage">
128 <div>
129 <div>
130 <h3 class="title"><a id="idp5626184"></a>Errors</h3>
131 </div>
132 </div>
133 </div>
134 <p>
135 The <code class="methodname">Db::set_heapsize()</code> <span>
136
137 <span>
138 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a>
139 exception, encapsulating one of the following non-zero errors, or return one
140 of the following non-zero errors:
141 </span>
142 </span>
143 </p>
144 <div class="sect3" lang="en" xml:lang="en">
145 <div class="titlepage">
146 <div>
147 <div>
148 <h4 class="title"><a id="idp5660904"></a>EINVAL</h4>
149 </div>
150 </div>
151 </div>
152 <p>
153 If the specified heap size was too small; the method was
154 called after <a class="xref" href="dbopen.html" title="Db::open()">Db::open()</a>
155 was called; or if an invalid flag value or parameter was specified.
156 </p>
157 </div>
158 </div>
159 <div class="sect2" lang="en" xml:lang="en">
160 <div class="titlepage">
161 <div>
162 <div>
163 <h3 class="title"><a id="idp5663024"></a>Class</h3>
164 </div>
165 </div>
166 </div>
167 <p>
168 <a class="link" href="db.html" title="Chapter 2.  The Db Handle">Db</a>
169 </p>
170 </div>
171 <div class="sect2" lang="en" xml:lang="en">
172 <div class="titlepage">
173 <div>
174 <div>
175 <h3 class="title"><a id="idp5653488"></a>See Also</h3>
176 </div>
177 </div>
178 </div>
179 <p>
180 <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a>
181 </p>
182 </div>
183 </div>
184 <div class="navfooter">
185 <hr />
186 <table width="100%" summary="Navigation footer">
187 <tr>
188 <td width="40%" align="left"><a accesskey="p" href="dbset_h_nelem.html">Prev</a> </td>
189 <td width="20%" align="center">
190 <a accesskey="u" href="db.html">Up</a>
191 </td>
192 <td width="40%" align="right"> <a accesskey="n" href="dbset_heap_regionsize.html">Next</a></td>
193 </tr>
194 <tr>
195 <td width="40%" align="left" valign="top">Db::set_h_nelem() </td>
196 <td width="20%" align="center">
197 <a accesskey="h" href="index.html">Home</a>
198 </td>
199 <td width="40%" align="right" valign="top"> Db::set_heap_regionsize()</td>
200 </tr>
201 </table>
202 </div>
203 </body>
204 </html>