Debian Codegraph @

docs/api_reference/C/envset_lk_max_locks.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_max_locks()</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_max_lockers.html" title="DB_ENV-&gt;set_lk_max_lockers()" />
12 <link rel="next" href="envset_lk_max_objects.html" title="DB_ENV-&gt;set_lk_max_objects()" />
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_max_locks()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envset_lk_max_lockers.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="envset_lk_max_objects.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_max_locks"></a>DB_ENV-&gt;set_lk_max_locks()</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_max_locks(DB_ENV *dbenv, u_int32_t max); </pre>
45 <p>
46 This method is deprecated. Instead, use
47 <a class="xref" href="envset_memory_init.html" title="DB_ENV-&gt;set_memory_init()">DB_ENV-&gt;set_memory_init()</a>,
48 <a class="xref" href="envset_memory_max.html" title="DB_ENV-&gt;set_memory_max()">DB_ENV-&gt;set_memory_max()</a>, and
49 <a class="xref" href="envset_lk_tablesize.html" title="DB_ENV-&gt;set_lk_tablesize()">DB_ENV-&gt;set_lk_tablesize()</a>.
50 </p>
51 <p>
52 Set the maximum number of locks supported by the Berkeley DB
53 environment. This value is used by
54 <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a> to estimate how
55 much space to allocate for various lock-table data structures.
56 The default value is 1000 locks.
57 The final value specified for the locks should be more than or equal to
58 the number of lock table partitions.
59 For specific information on configuring
60 the size of the lock subsystem, see
61 <a href="../../programmer_reference/lock_max.html" class="olink">Configuring locking: sizing the system</a>.
62 </p>
63 <p>
64 The database environment's maximum number of locks may also be
65 configured using 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
66 the entry in that file is a single line with the string
67 "set_lk_max_locks", one or more whitespace characters, and the
68 number of locks. Because the <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file is read when the
69 database environment is opened, it will silently overrule
70 configuration done before that time.
71 </p>
72 <p>
73 The <code class="methodname">DB_ENV-&gt;set_lk_max_locks()</code> method configures a database
74 environment, not only operations performed using the specified
75 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a> handle.
76 </p>
77 <p>
78 The <code class="methodname">DB_ENV-&gt;set_lk_max_locks()</code> method may not be called after the
79 <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a> method is
80 called. If the database environment already exists when
81 <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a> is called, the
82 information specified to <code class="methodname">DB_ENV-&gt;set_lk_max_locks()</code> will be ignored.
83 </p>
84 <p>
85 The <code class="methodname">DB_ENV-&gt;set_lk_max_locks()</code> <span>
86 <span>
87 method returns a non-zero error value on failure and 0 on success.
88 </span>
89
90 </span>
91 </p>
92 <div class="sect2" lang="en" xml:lang="en">
93 <div class="titlepage">
94 <div>
95 <div>
96 <h3 class="title"><a id="idp52529408"></a>Parameters</h3>
97 </div>
98 </div>
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="idp52529600"></a>max</h4>
105 </div>
106 </div>
107 </div>
108 <p>
109 The <span class="bold"><strong>max</strong></span> parameter is the maximum
110 number of locks supported by the Berkeley DB environment.
111 </p>
112 </div>
113 </div>
114 <div class="sect2" lang="en" xml:lang="en">
115 <div class="titlepage">
116 <div>
117 <div>
118 <h3 class="title"><a id="idp52507344"></a>Errors</h3>
119 </div>
120 </div>
121 </div>
122 <p>
123 The <code class="methodname">DB_ENV-&gt;set_lk_max_locks()</code> <span>
124 <span>
125 method may fail and return one of the following non-zero errors:
126 </span>
127
128 </span>
129 </p>
130 <div class="sect3" lang="en" xml:lang="en">
131 <div class="titlepage">
132 <div>
133 <div>
134 <h4 class="title"><a id="idp52539608"></a>EINVAL</h4>
135 </div>
136 </div>
137 </div>
138 <p>
139 If the method was called after <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a>
140 was called; or if an invalid flag value or parameter was specified.
141 </p>
142 </div>
143 </div>
144 <div class="sect2" lang="en" xml:lang="en">
145 <div class="titlepage">
146 <div>
147 <div>
148 <h3 class="title"><a id="idp52538528"></a>Class</h3>
149 </div>
150 </div>
151 </div>
152 <p>
153 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>,
154 <a class="link" href="lock.html" title="Chapter 6.  The DB_LOCK Handle">DB_LOCK</a>
155 </p>
156 </div>
157 <div class="sect2" lang="en" xml:lang="en">
158 <div class="titlepage">
159 <div>
160 <div>
161 <h3 class="title"><a id="idp52541680"></a>See Also</h3>
162 </div>
163 </div>
164 </div>
165 <p>
166 <a class="xref" href="lock.html#locklist" title="Locking Subsystem and Related Methods">Locking Subsystem and Related Methods</a>
167 </p>
168 </div>
169 </div>
170 <div class="navfooter">
171 <hr />
172 <table width="100%" summary="Navigation footer">
173 <tr>
174 <td width="40%" align="left"><a accesskey="p" href="envset_lk_max_lockers.html">Prev</a> </td>
175 <td width="20%" align="center">
176 <a accesskey="u" href="lock.html">Up</a>
177 </td>
178 <td width="40%" align="right"> <a accesskey="n" href="envset_lk_max_objects.html">Next</a></td>
179 </tr>
180 <tr>
181 <td width="40%" align="left" valign="top">DB_ENV-&gt;set_lk_max_lockers() </td>
182 <td width="20%" align="center">
183 <a accesskey="h" href="index.html">Home</a>
184 </td>
185 <td width="40%" align="right" valign="top"> DB_ENV-&gt;set_lk_max_objects()</td>
186 </tr>
187 </table>
188 </div>
189 </body>
190 </html>