Debian Codegraph @

docs/api_reference/CXX/envget_memory_init.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>DbEnv::get_memory_init()</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="env.html" title="Chapter 5.  The DbEnv Handle" />
11 <link rel="prev" href="envget_intermediate_dir_mode.html" title="DbEnv::get_intermediate_dir_mode()" />
12 <link rel="next" href="envget_memory_max.html" title="DbEnv::get_memory_max()" />
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">DbEnv::get_memory_init()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envget_intermediate_dir_mode.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 5. 
26 The DbEnv Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="envget_memory_max.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="envget_memory_init"></a>DbEnv::get_memory_init()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbEnv::get_memory_init(DB_MEM_CONFIG type, u_int32_t *countp);</pre>
45 <p>
46 The <code class="methodname">DbEnv::get_memory_init()</code> method returns
47 the number of objects to allocate and initialize when an
48 environment is created. The count is returned for a specific named
49 structure. The count for each structure is set using the
50 <a class="xref" href="envset_memory_init.html" title="DbEnv::set_memory_init()">DbEnv::set_memory_init()</a>
51 method.
52 </p>
53 <p>
54 The <code class="methodname">DbEnv::get_memory_init()</code> method may be
55 called at any time during the life of the application.
56 </p>
57 <p>
58 The <code class="methodname">DbEnv::get_memory_init()</code> <span>
59
60 <span>
61 method either returns a non-zero error value or throws an
62 exception that encapsulates a non-zero error value on
63 failure, and returns 0 on success.
64 </span>
65 </span>
66
67 </p>
68 <div class="sect2" lang="en" xml:lang="en">
69 <div class="titlepage">
70 <div>
71 <div>
72 <h3 class="title"><a id="idp6874256"></a>Parameters</h3>
73 </div>
74 </div>
75 </div>
76 <div class="sect3" lang="en" xml:lang="en">
77 <div class="titlepage">
78 <div>
79 <div>
80 <h4 class="title"><a id="idp6873608"></a>type</h4>
81 </div>
82 </div>
83 </div>
84 <p>
85 The <span class="bold"><strong>struct</strong></span> parameter
86 identifies the structure for which you want
87 an object count returned. It must be one of the following
88 values:
89 </p>
90 <div class="itemizedlist">
91 <ul type="disc">
92 <li>
93 <p>
94 <code class="literal">DB_MEM_LOCK</code>
95 </p>
96 <p>
97 Initialize locks. A thread uses this structure
98 to lock a page (or record for the QUEUE access
99 method) and hold it to the end of a transactions.
100 </p>
101 </li>
102 <li>
103 <p>
104 <code class="literal">DB_MEM_LOCKOBJECT</code>
105 </p>
106 <p>
107 Initialize lock objects. For each page (or record) which
108 is locked in the system, a lock object will be allocated.
109 </p>
110 </li>
111 <li>
112 <p>
113 <code class="literal">DB_MEM_LOCKER</code>
114 </p>
115 <p>
116 Initialize lockers. Each thread which is active in a
117 transactional environment will use a locker structure
118 either for each transaction which is active, or for each
119 non-transactional cursor that is active.
120 </p>
121 </li>
122 <li>
123 <p>
124 <code class="literal">DB_MEM_LOGID</code>
125 </p>
126 <p>
127 Initialize the log fileid structures. For each database handle
128 which is opened for writing in a transactional environment,
129 a log fileid structure is used.
130 </p>
131 </li>
132 <li>
133 <p>
134 <code class="literal">DB_MEM_TRANSACTION</code>
135 </p>
136 <p>
137 Initialize transaction structures. Each active
138 transaction uses a transaction structure until it
139 either commits or aborts.
140 </p>
141 </li>
142 <li>
143 <p>
144 <code class="literal">DB_MEM_THREAD</code>
145 </p>
146 <p>
147 Initialize thread identification structures. If thread
148 tracking is enabled then each active thread will use a
149 structure. Note that since a thread does not signal the
150 BDB library that it will no longer be making calls, unused
151 structures may accumulate until a cleanup is triggered either
152 using a high water mark or by running
153 <a class="xref" href="envfailchk.html" title="DbEnv::failchk()">DbEnv::failchk()</a>.
154 </p>
155 </li>
156 </ul>
157 </div>
158 </div>
159 <div class="sect3" lang="en" xml:lang="en">
160 <div class="titlepage">
161 <div>
162 <div>
163 <h4 class="title"><a id="idp6887960"></a>countp</h4>
164 </div>
165 </div>
166 </div>
167 <p>
168 The <span class="bold"><strong>countp</strong></span> parameter references
169 memory into which the object count for the specified
170 structure is copied.
171 </p>
172 </div>
173 </div>
174 <div class="sect2" lang="en" xml:lang="en">
175 <div class="titlepage">
176 <div>
177 <div>
178 <h3 class="title"><a id="idp6877816"></a>Class</h3>
179 </div>
180 </div>
181 </div>
182 <p>
183 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>
184 </p>
185 </div>
186 <div class="sect2" lang="en" xml:lang="en">
187 <div class="titlepage">
188 <div>
189 <div>
190 <h3 class="title"><a id="idp6890248"></a>See Also</h3>
191 </div>
192 </div>
193 </div>
194 <p>
195 <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a>
196 </p>
197 </div>
198 </div>
199 <div class="navfooter">
200 <hr />
201 <table width="100%" summary="Navigation footer">
202 <tr>
203 <td width="40%" align="left"><a accesskey="p" href="envget_intermediate_dir_mode.html">Prev</a> </td>
204 <td width="20%" align="center">
205 <a accesskey="u" href="env.html">Up</a>
206 </td>
207 <td width="40%" align="right"> <a accesskey="n" href="envget_memory_max.html">Next</a></td>
208 </tr>
209 <tr>
210 <td width="40%" align="left" valign="top">DbEnv::get_intermediate_dir_mode() </td>
211 <td width="20%" align="center">
212 <a accesskey="h" href="index.html">Home</a>
213 </td>
214 <td width="40%" align="right" valign="top"> DbEnv::get_memory_max()</td>
215 </tr>
216 </table>
217 </div>
218 </body>
219 </html>