Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > ed376d6842ea322c25405e7c23b3bc12 > files > 333

libcommoncpp-devel-1.8.0-5.1mdv2010.1.i586.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 CommonC++: ost::SharedMemPager 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.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceost.html">ost</a>::<a class="el" href="classost_1_1_shared_mem_pager.html">SharedMemPager</a>
  </div>
</div>
<div class="contents">
<h1>ost::SharedMemPager Class Reference</h1><!-- doxytag: class="ost::SharedMemPager" --><!-- doxytag: inherits="ost::MemPager,ost::Mutex" -->
<p>The shared mempager uses a mutex to protect key access methods.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="misc_8h_source.html">misc.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ost::SharedMemPager:</div>
<div class="dynsection">
 <div class="center">
  <img src="classost_1_1_shared_mem_pager.png" usemap="#ost::SharedMemPager_map" alt=""/>
  <map id="ost::SharedMemPager_map" name="ost::SharedMemPager_map">
<area href="classost_1_1_mem_pager.html" alt="ost::MemPager" shape="rect" coords="0,0,136,24"/>
<area href="classost_1_1_mutex.html" alt="ost::Mutex" shape="rect" coords="146,0,282,24"/>
</map>
 </div>
</div>

<p><a href="classost_1_1_shared_mem_pager-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_shared_mem_pager.html#a6914e160b526068c31c0086134cbfbac">SharedMemPager</a> (size_t pagesize=4096, const char *name=NULL)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a mempager mutex pool.  <a href="#a6914e160b526068c31c0086134cbfbac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_shared_mem_pager.html#afafb0b8ce31a2b1fdee64a5a9cadebc6">purge</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Purge the memory pool while locked.  <a href="#afafb0b8ce31a2b1fdee64a5a9cadebc6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_shared_mem_pager.html#a644a00d48052aff83a180523b205aa6f">first</a> (size_t size)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the first memory page after locking.  <a href="#a644a00d48052aff83a180523b205aa6f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_shared_mem_pager.html#ad5c3aad294fd247a972a72983dcf831b">alloc</a> (size_t size)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the last memory page after locking.  <a href="#ad5c3aad294fd247a972a72983dcf831b"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The shared mempager uses a mutex to protect key access methods. </p>
<p>This class is used when a mempager will be shared by multiple threads.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar &lt;<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>&gt; mutex protected memory pager. </dd></dl>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6914e160b526068c31c0086134cbfbac"></a><!-- doxytag: member="ost::SharedMemPager::SharedMemPager" ref="a6914e160b526068c31c0086134cbfbac" args="(size_t pagesize=4096, const char *name=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ost::SharedMemPager::SharedMemPager </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>pagesize</em> = <code>4096</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em> = <code>NULL</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create a mempager mutex pool. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pagesize</em>&nbsp;</td><td>page size for allocation. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>a name for the pool. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ad5c3aad294fd247a972a72983dcf831b"></a><!-- doxytag: member="ost::SharedMemPager::alloc" ref="ad5c3aad294fd247a972a72983dcf831b" args="(size_t size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* ost::SharedMemPager::alloc </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the last memory page after locking. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>allocated memory space. </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of request. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="classost_1_1_mem_pager.html#a3a03cb50bd4084ddbf6314ec0339d176">ost::MemPager</a>.</p>

</div>
</div>
<a class="anchor" id="a644a00d48052aff83a180523b205aa6f"></a><!-- doxytag: member="ost::SharedMemPager::first" ref="a644a00d48052aff83a180523b205aa6f" args="(size_t size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* ost::SharedMemPager::first </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the first memory page after locking. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>allocated memory space. </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>of request. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="el" href="classost_1_1_mem_pager.html#a2c82ac4c97fcba81c643966973e78d84">ost::MemPager</a>.</p>

</div>
</div>
<a class="anchor" id="afafb0b8ce31a2b1fdee64a5a9cadebc6"></a><!-- doxytag: member="ost::SharedMemPager::purge" ref="afafb0b8ce31a2b1fdee64a5a9cadebc6" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::SharedMemPager::purge </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Purge the memory pool while locked. </p>

<p>Reimplemented from <a class="el" href="classost_1_1_mem_pager.html#a5bfdb6f2d6f569ba08c32c59efb3a012">ost::MemPager</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="misc_8h_source.html">misc.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Nov 12 09:55:47 2010 for GNU CommonC++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>