1<!--$Id: memp_set_clear_len.so,v 10.18 2005/11/30 19:46:21 bostic Exp $--> 2<!--Copyright (c) 1997,2008 Oracle. All rights reserved.--> 3<!--See the file LICENSE for redistribution information.--> 4<html> 5<head> 6<title>Berkeley DB: DB_MPOOLFILE->set_clear_len</title> 7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> 8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++"> 9</head> 10<body bgcolor=white> 11<table width="100%"><tr valign=top> 12<td> 13<b>DB_MPOOLFILE->set_clear_len</b> 14</td> 15<td align=right> 16<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a> 17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td> 18</tr></table> 19<hr size=1 noshade> 20<tt> 21<b><pre> 22#include <db.h> 23<p> 24int 25DB_MPOOLFILE->set_clear_len(DB_MPOOLFILE *mpf, u_int32_t len); 26<p> 27int 28DB_MPOOLFILE->get_clear_len(DB_MPOOLFILE *mpf, u_int32_t *lenp); 29</pre></b> 30<hr size=1 noshade> 31<b>Description: DB_MPOOLFILE->set_clear_len</b> 32<p>The DB_MPOOLFILE->set_clear_len method sets the number of initial bytes in a 33page that should be set to nul when the page is created as a result of 34the <a href="../api_c/memp_fget.html#DB_MPOOL_CREATE">DB_MPOOL_CREATE</a> or <a href="../api_c/memp_fget.html#DB_MPOOL_NEW">DB_MPOOL_NEW</a> flags being 35specified to <a href="../api_c/memp_fget.html">DB_MPOOLFILE->get</a>. If no clear length is specified, the 36entire page is cleared when it is created.</p> 37<p>The DB_MPOOLFILE->set_clear_len method configures a file in the memory pool, not only 38operations performed using the specified <a href="../api_c/mempfile_class.html">DB_MPOOLFILE</a> handle.</p> 39<p>The DB_MPOOLFILE->set_clear_len method may not be called after the <a href="../api_c/memp_fopen.html">DB_MPOOLFILE->open</a> method is 40called. 41If the file is already open in the memory pool when 42<a href="../api_c/memp_fopen.html">DB_MPOOLFILE->open</a> is called, the information specified to DB_MPOOLFILE->set_clear_len 43must be consistent with the existing file or an error will be 44returned. 45</p> 46<p>The DB_MPOOLFILE->set_clear_len method 47returns a non-zero error value on failure 48and 0 on success. 49</p> 50<b>Parameters</b> <br> 51 <b>len</b><ul compact><li>The <b>len</b> parameter is the number of initial bytes in a page that 52should be set to nul when the page is created. A value of 0 results in 53the entire page being set to nul bytes.</ul> 54<br> 55<hr size=1 noshade> 56<b>Description: DB_MPOOLFILE->get_clear_len</b> 57<p>The DB_MPOOLFILE->get_clear_len method returns the bytes to be cleared.</p> 58<p>The DB_MPOOLFILE->get_clear_len method may be called at any time during the life of the 59application.</p> 60<p>The DB_MPOOLFILE->get_clear_len method 61returns a non-zero error value on failure 62and 0 on success. 63</p> 64<b>Parameters</b> <br> 65 <b>lenp</b><ul compact><li>The DB_MPOOLFILE->get_clear_len method returns the 66bytes to be cleared in <b>lenp</b>.</ul> 67<br> 68<hr size=1 noshade> 69<br><b>Class</b> 70<a href="../api_c/env_class.html">DB_ENV</a>, <a href="../api_c/mempfile_class.html">DB_MPOOLFILE</a> 71<br><b>See Also</b> 72<a href="../api_c/memp_list.html">Memory Pools and Related Methods</a> 73</tt> 74<table width="100%"><tr><td><br></td><td align=right> 75<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> 76</td></tr></table> 77<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font> 78</body> 79</html> 80