| 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_MPOOLFILE->set_clear_len()</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="memp.html" title="Chapter 8. The DB_MPOOLFILE Handle" /> |
| 11 | <link rel="prev" href="mempget_priority.html" title="DB_MPOOLFILE->get_priority()" /> |
| 12 | <link rel="next" href="mempset_fileid.html" title="DB_MPOOLFILE->set_fileid()" /> |
| 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_MPOOLFILE->set_clear_len()</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="mempget_priority.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 8. |
| 26 | The DB_MPOOLFILE Handle |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="mempset_fileid.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="mempset_clear_len"></a>DB_MPOOLFILE->set_clear_len()</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <pre class="programlisting">#include <db.h> |
| 42 | |
| 43 | int |
| 44 | DB_MPOOLFILE->set_clear_len(DB_MPOOLFILE *mpf, u_int32_t len); </pre> |
| 45 | <p> |
| 46 | The <code class="methodname">DB_MPOOLFILE->set_clear_len()</code> method sets the number of initial |
| 47 | bytes in a page that should be set to nul when the page is created as |
| 48 | a result of the |
| 49 | <a class="link" href="mempfget.html#mpoolfget_DB_MPOOL_CREATE">DB_MPOOL_CREATE</a> |
| 50 | or <a class="link" href="mempfget.html#mpoolfget_DB_MPOOL_NEW">DB_MPOOL_NEW</a> |
| 51 | flags specified to <a class="xref" href="mempfget.html" title="DB_MPOOLFILE->get()">DB_MPOOLFILE->get()</a>. If no |
| 52 | clear length is specified, the entire page is cleared when it is |
| 53 | created. |
| 54 | </p> |
| 55 | <p> |
| 56 | The <code class="methodname">DB_MPOOLFILE->set_clear_len()</code> method configures a file in the |
| 57 | cache, not only operations performed using the specified |
| 58 | <a class="link" href="memp.html" title="Chapter 8. The DB_MPOOLFILE Handle">DB_MPOOLFILE</a> handle. |
| 59 | </p> |
| 60 | <p> |
| 61 | The <code class="methodname">DB_MPOOLFILE->set_clear_len()</code> method may not be called after the |
| 62 | <a class="xref" href="mempfopen.html" title="DB_MPOOLFILE->open()">DB_MPOOLFILE->open()</a> |
| 63 | method is called. If the file is already open in the cache when |
| 64 | <a class="xref" href="mempfopen.html" title="DB_MPOOLFILE->open()">DB_MPOOLFILE->open()</a> is |
| 65 | called, the information specified to <code class="methodname">DB_MPOOLFILE->set_clear_len()</code> |
| 66 | must be consistent with the existing file or an error will be returned. |
| 67 | </p> |
| 68 | <p> |
| 69 | The <code class="methodname">DB_MPOOLFILE->set_clear_len()</code> <span> |
| 70 | <span> |
| 71 | method returns a non-zero error value on failure and 0 on success. |
| 72 | </span> |
| 73 | |
| 74 | </span> |
| 75 | </p> |
| 76 | <div class="sect2" lang="en" xml:lang="en"> |
| 77 | <div class="titlepage"> |
| 78 | <div> |
| 79 | <div> |
| 80 | <h3 class="title"><a id="idp53569992"></a>Parameters</h3> |
| 81 | </div> |
| 82 | </div> |
| 83 | </div> |
| 84 | <div class="sect3" lang="en" xml:lang="en"> |
| 85 | <div class="titlepage"> |
| 86 | <div> |
| 87 | <div> |
| 88 | <h4 class="title"><a id="idp53569344"></a>len</h4> |
| 89 | </div> |
| 90 | </div> |
| 91 | </div> |
| 92 | <p> |
| 93 | The <span class="bold"><strong>len</strong></span> parameter is the number of |
| 94 | initial bytes in a page that should be set to nul when the page is |
| 95 | created. A value of 0 results in the entire page being set to nul |
| 96 | bytes. |
| 97 | </p> |
| 98 | </div> |
| 99 | </div> |
| 100 | <div class="sect2" lang="en" xml:lang="en"> |
| 101 | <div class="titlepage"> |
| 102 | <div> |
| 103 | <div> |
| 104 | <h3 class="title"><a id="idp53551744"></a>Class</h3> |
| 105 | </div> |
| 106 | </div> |
| 107 | </div> |
| 108 | <p> |
| 109 | <a class="link" href="env.html" title="Chapter 5. The DB_ENV Handle">DB_ENV</a>, <a class="link" href="memp.html" title="Chapter 8. The DB_MPOOLFILE Handle">DB_MPOOLFILE</a> |
| 110 | </p> |
| 111 | </div> |
| 112 | <div class="sect2" lang="en" xml:lang="en"> |
| 113 | <div class="titlepage"> |
| 114 | <div> |
| 115 | <div> |
| 116 | <h3 class="title"><a id="idp53561152"></a>See Also</h3> |
| 117 | </div> |
| 118 | </div> |
| 119 | </div> |
| 120 | <p> |
| 121 | <a class="xref" href="memp.html#memplist" title="Memory Pools and Related Methods">Memory Pools and Related Methods</a> |
| 122 | </p> |
| 123 | </div> |
| 124 | </div> |
| 125 | <div class="navfooter"> |
| 126 | <hr /> |
| 127 | <table width="100%" summary="Navigation footer"> |
| 128 | <tr> |
| 129 | <td width="40%" align="left"><a accesskey="p" href="mempget_priority.html">Prev</a> </td> |
| 130 | <td width="20%" align="center"> |
| 131 | <a accesskey="u" href="memp.html">Up</a> |
| 132 | </td> |
| 133 | <td width="40%" align="right"> <a accesskey="n" href="mempset_fileid.html">Next</a></td> |
| 134 | </tr> |
| 135 | <tr> |
| 136 | <td width="40%" align="left" valign="top">DB_MPOOLFILE->get_priority() </td> |
| 137 | <td width="20%" align="center"> |
| 138 | <a accesskey="h" href="index.html">Home</a> |
| 139 | </td> |
| 140 | <td width="40%" align="right" valign="top"> DB_MPOOLFILE->set_fileid()</td> |
| 141 | </tr> |
| 142 | </table> |
| 143 | </div> |
| 144 | </body> |
| 145 | </html> |