Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > ae19f57cd4e306abd5716199a310070b > files > 2673

gnuradio-doc-3.2.2-3.fc13.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>GNU Radio 3.2.2 C++ API: pmt_pool Class Reference</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.6.2 -->
<div class="contents">
<h1>pmt_pool Class Reference</h1><!-- doxytag: class="pmt_pool" -->
<p>very simple thread-safe fixed-size allocation pool  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="pmt__pool_8h_source.html">pmt_pool.h</a>&gt;</code></p>

<p><a href="classpmt__pool-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><b>item</b></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpmt__pool.html#aff4e8d57d1441a79ccd0a7b6164f7e4e">pmt_pool</a> (size_t itemsize, size_t alignment=16, size_t allocation_size=4096, size_t max_items=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpmt__pool.html#aee7004d923b1a2bfef46c46d8e18a0eb">~pmt_pool</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpmt__pool.html#a92d57a2f62e3b02693b86755e42a23c2">malloc</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpmt__pool.html#a949bba8b34cfa48772eecf8926cb475b">free</a> (void *p)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>very simple thread-safe fixed-size allocation pool </p>
<p>FIXME may want to go to global allocation with per-thread free list. This would eliminate virtually all lock contention. </p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aff4e8d57d1441a79ccd0a7b6164f7e4e"></a><!-- doxytag: member="pmt_pool::pmt_pool" ref="aff4e8d57d1441a79ccd0a7b6164f7e4e" args="(size_t itemsize, size_t alignment=16, size_t allocation_size=4096, size_t max_items=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">pmt_pool::pmt_pool </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>itemsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>alignment</em> = <code>16</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>allocation_size</em> = <code>4096</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>max_items</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>itemsize</em>&nbsp;</td><td>size in bytes of the items to be allocated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>alignment</em>&nbsp;</td><td>alignment in bytes of all objects to be allocated (must be power-of-2). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>allocation_size</em>&nbsp;</td><td>number of bytes to allocate at a time from the underlying allocator. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>max_items</em>&nbsp;</td><td>is the maximum number of items to allocate. If this number is exceeded, the allocate blocks. 0 implies no limit. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aee7004d923b1a2bfef46c46d8e18a0eb"></a><!-- doxytag: member="pmt_pool::~pmt_pool" ref="aee7004d923b1a2bfef46c46d8e18a0eb" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">pmt_pool::~pmt_pool </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a949bba8b34cfa48772eecf8926cb475b"></a><!-- doxytag: member="pmt_pool::free" ref="a949bba8b34cfa48772eecf8926cb475b" args="(void *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void pmt_pool::free </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">

</div>
</div>
<a class="anchor" id="a92d57a2f62e3b02693b86755e42a23c2"></a><!-- doxytag: member="pmt_pool::malloc" ref="a92d57a2f62e3b02693b86755e42a23c2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* pmt_pool::malloc </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="pmt__pool_8h_source.html">pmt_pool.h</a></li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>