Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > bfea28f33e7373c31a33dc7387b2a0be > files > 282

loki-lib-doc-0.1.7-2.fc12.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Loki: Internals</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Internals<br>
<small>
[<a class="el" href="a00216.html">Small objects</a>]</small>
</h1>
<p>
<div class="dynheader">
Collaboration diagram for Internals:</div>
<div class="dynsection">
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00127.html">Loki::SmallObjAllocator</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00002.html">Loki::AllocatorSingleton&lt; ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy &gt;</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00025.html">Loki::Chunk</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00056.html">Loki::FixedAllocator</a></td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00217.html#g2f0821e243f812a3ae2abfaea51895e8">Loki::GetOffset</a> (std::size_t numBytes, std::size_t alignment)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00217.html#g2444c5bff0a61b6751fb5f57e0c7e8c7">Loki::DefaultAllocator</a> (std::size_t numBytes, bool doThrow)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00217.html#g1d24bf776342ace8f2004e3a173f6cb3">Loki::DefaultDeallocator</a> (void *p)</td></tr>

</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g2444c5bff0a61b6751fb5f57e0c7e8c7"></a><!-- doxytag: member="Loki::DefaultAllocator" ref="g2444c5bff0a61b6751fb5f57e0c7e8c7" args="(std::size_t numBytes, bool doThrow)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* Loki::DefaultAllocator           </td>
          <td>(</td>
          <td class="paramtype">std::size_t&nbsp;</td>
          <td class="paramname"> <em>numBytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>doThrow</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Calls the default allocator when <a class="el" href="a00127.html">SmallObjAllocator</a> decides not to handle a request. <a class="el" href="a00127.html">SmallObjAllocator</a> calls this if the number of bytes is bigger than the size which can be handled by any <a class="el" href="a00056.html">FixedAllocator</a>. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>numBytes</em>&nbsp;</td><td>number of bytes </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>doThrow</em>&nbsp;</td><td>True if this function should throw an exception, or false if it should indicate failure by returning a NULL pointer. </td></tr>
  </table>
</dl>

<p>Referenced by <a class="el" href="a00261.html#l01109">Loki::SmallObjAllocator::Allocate()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g1d24bf776342ace8f2004e3a173f6cb3"></a><!-- doxytag: member="Loki::DefaultDeallocator" ref="g1d24bf776342ace8f2004e3a173f6cb3" args="(void *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Loki::DefaultDeallocator           </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>p</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Calls default deallocator when <a class="el" href="a00127.html">SmallObjAllocator</a> decides not to handle a request. The default deallocator could be the global delete operator or the free function. The free function is the preferred default deallocator since it matches malloc which is the preferred default allocator. <a class="el" href="a00127.html">SmallObjAllocator</a> will call this if an address was not found among any of its own blocks. 
<p>Referenced by <a class="el" href="a00261.html#l01144">Loki::SmallObjAllocator::Deallocate()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g2f0821e243f812a3ae2abfaea51895e8"></a><!-- doxytag: member="Loki::GetOffset" ref="g2f0821e243f812a3ae2abfaea51895e8" args="(std::size_t numBytes, std::size_t alignment)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::size_t Loki::GetOffset           </td>
          <td>(</td>
          <td class="paramtype">std::size_t&nbsp;</td>
          <td class="paramname"> <em>numBytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&nbsp;</td>
          <td class="paramname"> <em>alignment</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Calculates index into array where a <a class="el" href="a00056.html">FixedAllocator</a> of numBytes is located. 
<p>Referenced by <a class="el" href="a00261.html#l01109">Loki::SmallObjAllocator::Allocate()</a>, <a class="el" href="a00261.html#l01144">Loki::SmallObjAllocator::Deallocate()</a>, <a class="el" href="a00261.html#l01199">Loki::SmallObjAllocator::IsCorrupt()</a>, <a class="el" href="a00261.html#l01060">Loki::SmallObjAllocator::SmallObjAllocator()</a>, and <a class="el" href="a00261.html#l01088">Loki::SmallObjAllocator::TrimExcessMemory()</a>.</p>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 29 18:51:40 2009 for Loki by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>