Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > by-pkgid > 2269bb274471fd2722517c2c0b740d7f > files > 90

rpm-devel-4.0.4-19mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>falloc.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.17 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>rpmdb/falloc.c File Reference</h1>The entire file space is thus divided into blocks with a "struct fablock" at the header of each. 
<a href="#_details">More...</a>
<p>
<code>#include "<a class="el" href="system_8h-source.html">system.h</a>"</code><br>
<code>#include &lt;<a class="el" href="rpmio__internal_8h-source.html">rpmio_internal.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="rpmmessages_8h-source.html">rpmmessages.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="rpmerr_8h-source.html">rpmerr.h</a>&gt;</code><br>
<code>#include "<a class="el" href="falloc_8h-source.html">falloc.h</a>"</code><br>
<code>#include "<a class="el" href="debug_8h-source.html">debug.h</a>"</code><br>

<p>
<a href="falloc_8c-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Data Structures</h2></td></tr>
<tr><td nowrap align=right valign=top>struct &nbsp;</td><td valign=bottom><a class="el" href="structfaFileHeader.html">faFileHeader</a></td></tr>
<tr><td nowrap align=right valign=top>struct &nbsp;</td><td valign=bottom><a class="el" href="structfaFooter.html">faFooter</a></td></tr>
<tr><td nowrap align=right valign=top>struct &nbsp;</td><td valign=bottom><a class="el" href="structfaHeader.html">faHeader</a></td></tr>
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group__db1.html#a7">FA_MAGIC</a>&nbsp;&nbsp;&nbsp;0x02050920</td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td nowrap align=right valign=top>ssize_t&nbsp;</td><td valign=bottom><a class="el" href="falloc_8c.html#a3">Pread</a> (<a class="el" href="group__rpmio.html#a1">FD_t</a> fd, void *buf, size_t count, <a class="el" href="group__rpmio.html#a0">_libio_off_t</a> offset)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>pread(2) clone.</em> <a href="#a3"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>ssize_t&nbsp;</td><td valign=bottom><a class="el" href="falloc_8c.html#a4">Pwrite</a> (<a class="el" href="group__rpmio.html#a1">FD_t</a> fd, const void *buf, size_t count, <a class="el" href="group__rpmio.html#a0">_libio_off_t</a> offset)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>pwrite(2) clone.</em> <a href="#a4"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group__rpmio.html#a1">FD_t</a>&nbsp;</td><td valign=bottom><a class="el" href="group__db1.html#a1">fadOpen</a> (const char *path, int flags, mode_t perms)</td></tr>
<tr><td nowrap align=right valign=top>unsigned int&nbsp;</td><td valign=bottom><a class="el" href="group__db1.html#a2">fadAlloc</a> (<a class="el" href="group__rpmio.html#a1">FD_t</a> fd, unsigned int size)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__db1.html#a3">fadFree</a> (<a class="el" href="group__rpmio.html#a1">FD_t</a> fd, unsigned int offset)</td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="falloc_8c.html#a8">fadSanity</a> (<a class="el" href="group__rpmio.html#a1">FD_t</a> fd, int offset, const struct <a class="el" href="structfaHeader.html">faHeader</a> *fh, int printit)</td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="group__db1.html#a4">fadFirstOffset</a> (<a class="el" href="group__rpmio.html#a1">FD_t</a> fd)</td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="group__db1.html#a5">fadNextOffset</a> (<a class="el" href="group__rpmio.html#a1">FD_t</a> fd, unsigned int lastoff)</td></tr>
<tr><td colspan=2><br><h2>Variables</h2></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="structFDIO__s.html">FDIO_s</a>&nbsp;</td><td valign=bottom><a class="el" href="falloc_8c.html#a1">fadio_s</a></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group__rpmio.html#a2">FDIO_t</a>&nbsp;</td><td valign=bottom><a class="el" href="falloc_8c.html#a2">fadio</a> = &amp;<a class="el" href="falloc_8c.html#a1">fadio_s</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The entire file space is thus divided into blocks with a "struct fablock" at the header of each.
<p>
 The size fields doubly link this block list.
<p>
There is an additional free list weaved through the block list, which  keeps new allocations fast.
<p>
Much of this was inspired by Knuth vol 1.
<p>

<p>
Definition in file <a class="el" href="falloc_8c-source.html">falloc.c</a>.<hr><h2>Function Documentation</h2>
<a name="a8" doxytag="falloc.c::fadSanity"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int fadSanity </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__rpmio.html#a1">FD_t</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>fd</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>offset</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const struct <a class="el" href="structfaHeader.html">faHeader</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>fh</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>printit</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="falloc_8c-source.html#l00421">421</a> of file <a class="el" href="falloc_8c-source.html">falloc.c</a>.
<p>
References <a class="el" href="falloc_8c-source.html#l00032">faHeader::freeNext</a>, <a class="el" href="rpmmessages_8h-source.html#l00011">RPMMESS_DEBUG</a>, <a class="el" href="rpmmessages_8h-source.html#l00020">rpmMessage</a>, and <a class="el" href="falloc_8c-source.html#l00031">faHeader::size</a>.
<p>
Referenced by <a class="el" href="falloc_8c-source.html#l00467">fadNextOffset</a>().    </td>
  </tr>
</table>
<a name="a3" doxytag="falloc.c::Pread"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> ssize_t Pread </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__rpmio.html#a1">FD_t</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>fd</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>buf</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>count</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__rpmio.html#a0">_libio_off_t</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>offset</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
pread(2) clone.
<p>

<p>
Definition at line <a class="el" href="falloc_8c-source.html#l00058">58</a> of file <a class="el" href="falloc_8c-source.html">falloc.c</a>.
<p>
References <a class="el" href="rpmio_8h-source.html#l00039">_libio_off_t</a>, <a class="el" href="rpmio_8c-source.html#l02599">Fread</a>(), <a class="el" href="rpmio_8c-source.html#l02651">Fseek</a>(), and <a class="el" href="system_8h-source.html#l00139">SEEK_SET</a>.
<p>
Referenced by <a class="el" href="falloc_8c-source.html#l00144">fadAlloc</a>(), <a class="el" href="falloc_8c-source.html#l00334">fadFree</a>(), <a class="el" href="falloc_8c-source.html#l00467">fadNextOffset</a>(), and <a class="el" href="falloc_8c-source.html#l00085">fadOpen</a>().    </td>
  </tr>
</table>
<a name="a4" doxytag="falloc.c::Pwrite"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> ssize_t Pwrite </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__rpmio.html#a1">FD_t</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>fd</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>buf</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>count</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__rpmio.html#a0">_libio_off_t</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>offset</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
pwrite(2) clone.
<p>

<p>
Definition at line <a class="el" href="falloc_8c-source.html#l00073">73</a> of file <a class="el" href="falloc_8c-source.html">falloc.c</a>.
<p>
References <a class="el" href="rpmio_8h-source.html#l00039">_libio_off_t</a>, <a class="el" href="rpmio_8c-source.html#l02651">Fseek</a>(), <a class="el" href="rpmio_8c-source.html#l02626">Fwrite</a>(), and <a class="el" href="system_8h-source.html#l00139">SEEK_SET</a>.
<p>
Referenced by <a class="el" href="falloc_8c-source.html#l00144">fadAlloc</a>(), and <a class="el" href="falloc_8c-source.html#l00334">fadFree</a>().    </td>
  </tr>
</table>
<hr><h2>Variable Documentation</h2>
<a name="a2" doxytag="falloc.c::fadio"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="group__rpmio.html#a2">FDIO_t</a> fadio = &amp;<a class="el" href="falloc_8c.html#a1">fadio_s</a>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="falloc_8c-source.html#l00051">51</a> of file <a class="el" href="falloc_8c-source.html">falloc.c</a>.    </td>
  </tr>
</table>
<a name="a1" doxytag="falloc.c::fadio_s"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> struct <a class="el" href="structFDIO__s.html">FDIO_s</a> fadio_s<code> [static]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<b>Initial value:</b><div class="fragment"><pre> {
  NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  fadOpen, NULL, NULL,  NULL, NULL, NULL, NULL, NULL, NULL
}</pre></div>
<p>
Definition at line <a class="el" href="falloc_8c-source.html#l00046">46</a> of file <a class="el" href="falloc_8c-source.html">falloc.c</a>.    </td>
  </tr>
</table>
<hr><address style="align: right;"><small>Generated on Thu Sep 12 22:15:07 2002 for rpm by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.17 </small></address>
</body>
</html>