<!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>ost::SharedMemPager class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body bgcolor="#ffffff"> <!-- Generated by Doxygen 1.2.10 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> <hr><h1>ost::SharedMemPager Class Reference</h1>The shared mempager uses a mutex to protect key access methods. mutex protected memory pager. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="misc_8h-source.html">misc.h</a>></code> <p> <p>Inheritance diagram for ost::SharedMemPager:: <p><center><img src="classost_1_1_shared_mem_pager.gif" usemap="#ost::SharedMemPager_map" border="0"></center> <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> <a href="classost_1_1_shared_mem_pager-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td colspan=2><br><h2>Protected Methods</h2></td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classost_1_1_shared_mem_pager.html#b0">SharedMemPager</a> (int pg=4096)</td></tr> <tr><td> </td><td><font size=-1><em>Create a mempager mutex pool.</em> <a href="#b0">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classost_1_1_shared_mem_pager.html#b1">purge</a> (void)</td></tr> <tr><td> </td><td><font size=-1><em>Purge the memory pool while locked.</em> <a href="#b1">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>void * </td><td valign=bottom><a class="el" href="classost_1_1_shared_mem_pager.html#b2">first</a> (size_t size)</td></tr> <tr><td> </td><td><font size=-1><em>Get the first memory page after locking.</em> <a href="#b2">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>void * </td><td valign=bottom><a class="el" href="classost_1_1_shared_mem_pager.html#b3">alloc</a> (size_t size)</td></tr> <tr><td> </td><td><font size=-1><em>Get the last memory page after locking.</em> <a href="#b3">More...</a><em></em></font><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> The shared mempager uses a mutex to protect key access methods. mutex protected memory pager. <p> This class is used when a mempager will be shared by multiple threads. <p> <dl compact><dt><b> Author: </b><dd> David Sugar <<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>> </dl> <p> <hr><h2>Constructor & Destructor Documentation</h2> <a name="b0" doxytag="ost::SharedMemPager::SharedMemPager"></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"> ost::SharedMemPager::SharedMemPager </td> <td class="md">( </td> <td class="md">int</td> <td class="mdname1"> <em>pg</em> = 4096 </td> <td class="md">) </td> <td class="md"><code> [protected]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Create a mempager mutex pool. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>pagesize </em> </td><td> for allocation. </td></tr> </table> </dl> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="b3" doxytag="ost::SharedMemPager::alloc"></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"> void* ost::SharedMemPager::alloc </td> <td class="md">( </td> <td class="md">size_t</td> <td class="mdname1"> <em>size</em> </td> <td class="md">) </td> <td class="md"><code> [protected, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get the last memory page after locking. <p> <dl compact><dt><b> Returns: </b><dd> allocated memory space. </dl><dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>size </em> </td><td> of request. </td></tr> </table> </dl> <p> Reimplemented from <a class="el" href="classost_1_1_mem_pager.html#b1">ost::MemPager</a>. </td> </tr> </table> <a name="b2" doxytag="ost::SharedMemPager::first"></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"> void* ost::SharedMemPager::first </td> <td class="md">( </td> <td class="md">size_t</td> <td class="mdname1"> <em>size</em> </td> <td class="md">) </td> <td class="md"><code> [protected, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get the first memory page after locking. <p> <dl compact><dt><b> Returns: </b><dd> allocated memory space. </dl><dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>size </em> </td><td> of request. </td></tr> </table> </dl> <p> Reimplemented from <a class="el" href="classost_1_1_mem_pager.html#b0">ost::MemPager</a>. </td> </tr> </table> <a name="b1" doxytag="ost::SharedMemPager::purge"></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"> void ost::SharedMemPager::purge </td> <td class="md">( </td> <td class="md">void</td> <td class="mdname1"> </td> <td class="md">) </td> <td class="md"><code> [protected]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Purge the memory pool while locked. <p> <p> Reimplemented from <a class="el" href="classost_1_1_mem_pager.html#b5">ost::MemPager</a>. </td> </tr> </table> <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></ul> <hr><address><small>Generated at Fri Jan 4 18:51:50 2002 for CommonC++ by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.gif" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.10 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, © 1997-2001</small></address> </body> </html>