Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > by-pkgid > 4f37b923758ceff94a2c0ccca62b4b43 > files > 181

libapr1-devel-1.1.1-1mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Apache Portable Runtime: MMAP (Memory Map) Routines</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>MMAP (Memory Map) Routines<br>
<small>
[<a class="el" href="group__APR.html">Apache Portability Runtime library</a>]</small>
</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structapr__mmap__t.html">apr_mmap_t</a></td></tr>

<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__mmap.html#ga5">APR_MMAP_READ</a>&nbsp;&nbsp;&nbsp;1</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__mmap.html#ga6">APR_MMAP_WRITE</a>&nbsp;&nbsp;&nbsp;2</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__mmap.html#ga7">APR_MMAP_THRESHOLD</a>&nbsp;&nbsp;&nbsp;1</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__mmap.html#ga8">APR_MMAP_LIMIT</a>&nbsp;&nbsp;&nbsp;(4*1024*1024)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__mmap.html#ga9">APR_MMAP_CANDIDATE</a>(filelength)&nbsp;&nbsp;&nbsp;((filelength &gt;= APR_MMAP_THRESHOLD) &amp;&amp; (filelength &lt; APR_MMAP_LIMIT))</td></tr>

<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structapr__mmap__t.html">apr_mmap_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__mmap.html#ga0">apr_mmap_t</a></td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__mmap.html#ga1">apr_mmap_create</a> (<a class="el" href="structapr__mmap__t.html">apr_mmap_t</a> **newmmap, <a class="el" href="group__apr__file__io.html#ga2">apr_file_t</a> *file, apr_off_t offset, apr_size_t size, apr_int32_t flag, <a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *cntxt)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__mmap.html#ga2">apr_mmap_dup</a> (<a class="el" href="structapr__mmap__t.html">apr_mmap_t</a> **new_mmap, <a class="el" href="structapr__mmap__t.html">apr_mmap_t</a> *old_mmap, <a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__mmap.html#ga3">apr_mmap_delete</a> (<a class="el" href="structapr__mmap__t.html">apr_mmap_t</a> *mm)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__mmap.html#ga4">apr_mmap_offset</a> (void **addr, <a class="el" href="structapr__mmap__t.html">apr_mmap_t</a> *mm, apr_off_t offset)</td></tr>

</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="ga9" doxytag="apr_mmap.h::APR_MMAP_CANDIDATE"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">#define APR_MMAP_CANDIDATE          </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">filelength&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;((filelength &gt;= APR_MMAP_THRESHOLD) &amp;&amp; (filelength &lt; APR_MMAP_LIMIT))</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Can this file be MMaped     </td>
  </tr>
</table>
<a class="anchor" name="ga8" doxytag="apr_mmap.h::APR_MMAP_LIMIT"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">#define APR_MMAP_LIMIT&nbsp;&nbsp;&nbsp;(4*1024*1024)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Maximum size of MMap region     </td>
  </tr>
</table>
<a class="anchor" name="ga5" doxytag="apr_mmap.h::APR_MMAP_READ"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">#define APR_MMAP_READ&nbsp;&nbsp;&nbsp;1          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
MMap opened for reading     </td>
  </tr>
</table>
<a class="anchor" name="ga7" doxytag="apr_mmap.h::APR_MMAP_THRESHOLD"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">#define APR_MMAP_THRESHOLD&nbsp;&nbsp;&nbsp;1          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Files have to be at least this big before they're mmap()d. This is to deal with systems where the expense of doing an mmap() and an munmap() outweighs the benefit for small files. It shouldn't be set lower than 1.     </td>
  </tr>
</table>
<a class="anchor" name="ga6" doxytag="apr_mmap.h::APR_MMAP_WRITE"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">#define APR_MMAP_WRITE&nbsp;&nbsp;&nbsp;2          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
MMap opened for writing     </td>
  </tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="ga0" doxytag="apr_mmap.h::apr_mmap_t"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">typedef struct <a class="el" href="structapr__mmap__t.html">apr_mmap_t</a> <a class="el" href="structapr__mmap__t.html">apr_mmap_t</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structapr__mmap__t.html">apr_mmap_t</a> </dd></dl>
    </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga1" doxytag="apr_mmap.h::apr_mmap_create"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_mmap_create           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structapr__mmap__t.html">apr_mmap_t</a> **&nbsp;</td>
          <td class="mdname" nowrap> <em>newmmap</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__apr__file__io.html#ga2">apr_file_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>file</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>apr_off_t&nbsp;</td>
          <td class="mdname" nowrap> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>apr_size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>size</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>apr_int32_t&nbsp;</td>
          <td class="mdname" nowrap> <em>flag</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>cntxt</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a new mmap'ed file out of an existing APR file. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>newmmap</em>&nbsp;</td><td>The newly created mmap'ed file. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>file</em>&nbsp;</td><td>The file turn into an mmap. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>The offset into the file to start the data pointer at. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>The size of the file </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flag</em>&nbsp;</td><td>bit-wise or of: <pre>
          APR_MMAP_READ       MMap opened for reading
          APR_MMAP_WRITE      MMap opened for writing
 </pre> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cntxt</em>&nbsp;</td><td>The pool to use when creating the mmap. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga3" doxytag="apr_mmap.h::apr_mmap_delete"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_mmap_delete           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structapr__mmap__t.html">apr_mmap_t</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>mm</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Remove a mmap'ed. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mm</em>&nbsp;</td><td>The mmap'ed file. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga2" doxytag="apr_mmap.h::apr_mmap_dup"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_mmap_dup           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structapr__mmap__t.html">apr_mmap_t</a> **&nbsp;</td>
          <td class="mdname" nowrap> <em>new_mmap</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structapr__mmap__t.html">apr_mmap_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>old_mmap</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>p</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Duplicate the specified MMAP. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>new_mmap</em>&nbsp;</td><td>The structure to duplicate into. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>old_mmap</em>&nbsp;</td><td>The mmap to duplicate. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>The pool to use for new_mmap. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga4" doxytag="apr_mmap.h::apr_mmap_offset"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_mmap_offset           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void **&nbsp;</td>
          <td class="mdname" nowrap> <em>addr</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structapr__mmap__t.html">apr_mmap_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>mm</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>apr_off_t&nbsp;</td>
          <td class="mdname" nowrap> <em>offset</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Move the pointer into the mmap'ed file to the specified offset. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>addr</em>&nbsp;</td><td>The pointer to the offset specified. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mm</em>&nbsp;</td><td>The mmap'ed file. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>The offset to move to. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun Mar 20 19:52:27 2005 for Apache Portable Runtime by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
</body>
</html>