81 lines
3.5 KiB
HTML
81 lines
3.5 KiB
HTML
<!--$Id: memp_set_maxsize.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
|
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
|
<!--See the file LICENSE for redistribution information.-->
|
|
<html>
|
|
<head>
|
|
<title>Berkeley DB: DB_MPOOLFILE->set_maxsize</title>
|
|
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
|
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
|
</head>
|
|
<body bgcolor=white>
|
|
<table width="100%"><tr valign=top>
|
|
<td>
|
|
<b>DB_MPOOLFILE->set_maxsize</b>
|
|
</td>
|
|
<td align=right>
|
|
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
|
|
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
|
|
</tr></table>
|
|
<hr size=1 noshade>
|
|
<tt>
|
|
<b><pre>
|
|
#include <db.h>
|
|
<p>
|
|
int
|
|
DB_MPOOLFILE->set_maxsize(DB_MPOOLFILE *mpf,
|
|
u_int32_t gbytes, u_int32_t bytes);
|
|
<p>
|
|
int
|
|
DB_MPOOLFILE->get_maxsize(DB_MPOOLFILE *mpf,
|
|
u_int32_t *gbytesp, u_int32_t *bytesp);
|
|
</pre></b>
|
|
<hr size=1 noshade>
|
|
<b>Description: DB_MPOOLFILE->set_maxsize</b>
|
|
<p>Set the maximum size for the file to be <b>gbytes</b> gigabytes plus
|
|
<b>bytes</b>. Attempts to allocate new pages in the file after the
|
|
limit has been reached will fail.</p>
|
|
<p>To set the maximum file size for a particular database, call the
|
|
DB_MPOOLFILE->set_maxsize method using the <a href="../api_c/mempfile_class.html">DB_MPOOLFILE</a> handle stored
|
|
in the <b>mpf</b> field of the <a href="../api_c/db_class.html">DB</a> handle. Attempts to insert
|
|
new items into the database after the limit has been reached may fail.</p>
|
|
<p>The DB_MPOOLFILE->set_maxsize method configures a file in the memory pool, not only
|
|
operations performed using the specified <a href="../api_c/mempfile_class.html">DB_MPOOLFILE</a> handle.</p>
|
|
<p>The DB_MPOOLFILE->set_maxsize method may be called at any time during the life of the
|
|
application.</p>
|
|
<p>The DB_MPOOLFILE->set_maxsize method
|
|
returns a non-zero error value on failure
|
|
and 0 on success.
|
|
</p>
|
|
<b>Parameters</b> <br>
|
|
<b>bytes</b><ul compact><li>The maximum size of the file is set to <b>gbytes</b> gigabytes plus
|
|
<b>bytes</b>.</ul>
|
|
<b>gbytes</b><ul compact><li>The maximum size of the file is set to <b>gbytes</b> gigabytes plus
|
|
<b>bytes</b>.</ul>
|
|
<br>
|
|
<hr size=1 noshade>
|
|
<b>Description: DB_MPOOLFILE->get_maxsize</b>
|
|
<p>The DB_MPOOLFILE->get_maxsize method
|
|
returns a non-zero error value on failure
|
|
and 0 on success.
|
|
</p>
|
|
<p>The DB_MPOOLFILE->get_maxsize method may be called at any time during the life of the
|
|
application.</p>
|
|
<b>Parameters</b> <br>
|
|
<b>bytesp</b><ul compact><li>The <b>bytesp</b> parameter references memory into which
|
|
the additional bytes of memory in the maximum file size is copied.</ul>
|
|
<b>gbytesp</b><ul compact><li>The <b>gbytesp</b> parameter references memory into which
|
|
the gigabytes of memory in the maximum file size is copied.</ul>
|
|
<br>
|
|
<hr size=1 noshade>
|
|
<br><b>Class</b>
|
|
<a href="../api_c/env_class.html">DB_ENV</a>, <a href="../api_c/mempfile_class.html">DB_MPOOLFILE</a>
|
|
<br><b>See Also</b>
|
|
<a href="../api_c/memp_list.html">Memory Pools and Related Methods</a>
|
|
</tt>
|
|
<table width="100%"><tr><td><br></td><td align=right>
|
|
<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
|
|
</td></tr></table>
|
|
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
|
</body>
|
|
</html>
|