Debian Codegraph @

docs/api_reference/C/envset_lk_tablesize.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_ENV-&gt;set_lk_tablesize()</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="lock.html" title="Chapter 6.  The DB_LOCK Handle" />
11 <link rel="prev" href="envset_lk_priority.html" title="DB_ENV-&gt;set_lk_priority()" />
12 <link rel="next" href="lockdetect.html" title="DB_ENV-&gt;lock_detect()" />
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_ENV-&gt;set_lk_tablesize()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envset_lk_priority.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 6. 
26 The DB_LOCK Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="lockdetect.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="envset_lk_tablesize"></a>DB_ENV-&gt;set_lk_tablesize()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DB_ENV-&gt;set_lk_tablesize(DB_ENV *dbenv, u_int32_t tablesize); </pre>
45 <p>
46 Sets the number of buckets in the lock object
47 hash table in the Berkeley DB
48 environment. The default value is estimated based on defaults,
49 initial and (deprecated) maximum settings of the number of lock
50 objects allocated. The maximum memory allocation is also
51 considered. The table is generally set to be close to the number
52 of lock objects in the system to avoid collisions and delay in
53 processing lock operations.
54 </p>
55 <p>
56 The database environment's tablesize may also be configured using
57 the environment's <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file. The syntax of the entry in
58 that file is a single line with the string "set_lk_tablesize", one
59 or more whitespace characters, and the size of the table. Because
60 the <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file is read when the database environment is
61 opened, it will silently overrule configuration done before that
62 time.
63 </p>
64 <p>
65 The <code class="methodname">DB_ENV-&gt;set_lk_tablesize()</code> method configures a database
66 environment, not only operations performed using the specified
67 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a> handle.
68 </p>
69 <p>
70 The <code class="methodname">DB_ENV-&gt;set_lk_tablesize()</code> method may not be called after the
71 <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a> method is
72 called. If the database environment already exists when
73 <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a> is called, the
74 information specified to <code class="methodname">DB_ENV-&gt;set_lk_tablesize()</code> will be ignored.
75 </p>
76 <p>
77 The <code class="methodname">DB_ENV-&gt;set_lk_tablesize()</code> <span>
78 <span>
79 method returns a non-zero error value on failure and 0 on success.
80 </span>
81
82 </span>
83 </p>
84 <div class="sect2" lang="en" xml:lang="en">
85 <div class="titlepage">
86 <div>
87 <div>
88 <h3 class="title"><a id="idp52574040"></a>Parameters</h3>
89 </div>
90 </div>
91 </div>
92 <div class="sect3" lang="en" xml:lang="en">
93 <div class="titlepage">
94 <div>
95 <div>
96 <h4 class="title"><a id="idp52574688"></a>tablesize</h4>
97 </div>
98 </div>
99 </div>
100 <p>
101 The <span class="bold"><strong>tablesize</strong></span> parameter provides the
102 size of the lock object hash table to be configured in the
103 Berkeley DB environment.
104 </p>
105 </div>
106 </div>
107 <div class="sect2" lang="en" xml:lang="en">
108 <div class="titlepage">
109 <div>
110 <div>
111 <h3 class="title"><a id="idp52576424"></a>Errors</h3>
112 </div>
113 </div>
114 </div>
115 <p>
116 The <code class="methodname">DB_ENV-&gt;set_lk_tablesize()</code> <span>
117 <span>
118 method may fail and return one of the following non-zero errors:
119 </span>
120
121 </span>
122 </p>
123 <div class="sect3" lang="en" xml:lang="en">
124 <div class="titlepage">
125 <div>
126 <div>
127 <h4 class="title"><a id="idp52592104"></a>EINVAL</h4>
128 </div>
129 </div>
130 </div>
131 <p>
132 If the method was called after <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a>
133 was called; or if an invalid flag value or parameter was specified.
134 </p>
135 </div>
136 </div>
137 <div class="sect2" lang="en" xml:lang="en">
138 <div class="titlepage">
139 <div>
140 <div>
141 <h3 class="title"><a id="idp52574752"></a>Class</h3>
142 </div>
143 </div>
144 </div>
145 <p>
146 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>,
147 <a class="link" href="lock.html" title="Chapter 6.  The DB_LOCK Handle">DB_LOCK</a>
148 </p>
149 </div>
150 <div class="sect2" lang="en" xml:lang="en">
151 <div class="titlepage">
152 <div>
153 <div>
154 <h3 class="title"><a id="idp52594336"></a>See Also</h3>
155 </div>
156 </div>
157 </div>
158 <p>
159 <a class="xref" href="lock.html#locklist" title="Locking Subsystem and Related Methods">Locking Subsystem and Related Methods</a>
160 </p>
161 </div>
162 </div>
163 <div class="navfooter">
164 <hr />
165 <table width="100%" summary="Navigation footer">
166 <tr>
167 <td width="40%" align="left"><a accesskey="p" href="envset_lk_priority.html">Prev</a> </td>
168 <td width="20%" align="center">
169 <a accesskey="u" href="lock.html">Up</a>
170 </td>
171 <td width="40%" align="right"> <a accesskey="n" href="lockdetect.html">Next</a></td>
172 </tr>
173 <tr>
174 <td width="40%" align="left" valign="top">DB_ENV-&gt;set_lk_priority() </td>
175 <td width="20%" align="center">
176 <a accesskey="h" href="index.html">Home</a>
177 </td>
178 <td width="40%" align="right" valign="top"> DB_ENV-&gt;lock_detect()</td>
179 </tr>
180 </table>
181 </div>
182 </body>
183 </html>