<!--$Id: memp_set_maxsize.so,v 1.15 2005/09/17 16:30:18 bostic Exp $--> <!--Copyright (c) 1997,2007 Oracle. All rights reserved.--> <!--See the file LICENSE for redistribution information.--> <html> <head> <title>Berkeley DB: DbMpoolFile::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> <h3>DbMpoolFile::set_maxsize</h3> </td> <td align=right> <a href="../../db46-devel-4.6.21/api_cxx/api_core.html"><img src="../../db46-devel-4.6.21/images/api.gif" alt="API"></a> <a href="../../db46-devel-4.6.21/ref/toc.html"><img src="../../db46-devel-4.6.21/images/ref.gif" alt="Ref"></a></td> </tr></table> <hr size=1 noshade> <tt> <h3><pre> #include <db_cxx.h> <p> int DbMpoolFile::set_maxsize(u_int32_t gbytes, u_int32_t bytes); <p> int DbMpoolFile::get_maxsize(u_int32_t *gbytesp, u_int32_t *bytesp); </pre></h3> <hr size=1 noshade> <h3>Description: DbMpoolFile::set_maxsize</h3> <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 DbMpoolFile::set_maxsize method using the <a href="../../db46-devel-4.6.21/api_cxx/mempfile_class.html">DbMpoolFile</a> handle stored in the <b>mpf</b> field of the <a href="../../db46-devel-4.6.21/api_cxx/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 DbMpoolFile::set_maxsize method configures a file in the memory pool, not only operations performed using the specified <a href="../../db46-devel-4.6.21/api_cxx/mempfile_class.html">DbMpoolFile</a> handle.</p> <p>The DbMpoolFile::set_maxsize method may be called at any time during the life of the application.</p> <p>The DbMpoolFile::set_maxsize method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success. </p> <h3>Parameters</h3> <dl compact> <dt><b>bytes</b><dd>The maximum size of the file is set to <b>gbytes</b> gigabytes plus <b>bytes</b>. <dt><b>gbytes</b><dd>The maximum size of the file is set to <b>gbytes</b> gigabytes plus <b>bytes</b>. </dl> <hr size=1 noshade> <h3>Description: DbMpoolFile::get_maxsize</h3> <p>The DbMpoolFile::get_maxsize method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success. </p> <p>The DbMpoolFile::get_maxsize method may be called at any time during the life of the application.</p> <h3>Parameters</h3> <dl compact> <dt><b>bytesp</b><dd>The <b>bytesp</b> parameter references memory into which the additional bytes of memory in the maximum file size is copied. <dt><b>gbytesp</b><dd>The <b>gbytesp</b> parameter references memory into which the gigabytes of memory in the maximum file size is copied. </dl> <hr size=1 noshade> <h3>Class</h3> <a href="../../db46-devel-4.6.21/api_cxx/env_class.html">DbEnv</a>, <a href="../../db46-devel-4.6.21/api_cxx/mempfile_class.html">DbMpoolFile</a> <h3>See Also</h3> <a href="../../db46-devel-4.6.21/api_cxx/memp_list.html">Memory Pools and Related Methods</a> </tt> <table width="100%"><tr><td><br></td><td align=right> <a href="../../db46-devel-4.6.21/api_cxx/api_core.html"><img src="../../db46-devel-4.6.21/images/api.gif" alt="API"></a><a href="../../db46-devel-4.6.21/ref/toc.html"><img src="../../db46-devel-4.6.21/images/ref.gif" alt="Ref"></a> </td></tr></table> <p><font size=1>Copyright (c) 1996,2007 Oracle. All rights reserved.</font> </body> </html>