<!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>libstdc++: __gnu_cxx::__pool_alloc_base Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.4 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">libstdc++</div> </td> </tr> </tbody> </table> </div> </div> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> initNavTree('a00015.html',''); </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#pro-types">Protected Types</a> | <a href="#pro-methods">Protected Member Functions</a> | <a href="#pro-static-attribs">Static Protected Attributes</a> </div> <div class="headertitle"> <div class="title">__gnu_cxx::__pool_alloc_base Class Reference</div> </div> </div> <div class="contents"> <!-- doxytag: class="__gnu_cxx::__pool_alloc_base" --> <p>Base class for <a class="el" href="a00014.html" title="Allocator using a memory pool with a single lock.">__pool_alloc</a>. <a href="a00015.html#details">More...</a></p> <div class="dynheader"> Inheritance diagram for __gnu_cxx::__pool_alloc_base:</div> <div class="dyncontent"> <div class="center"><img src="a01399.png" border="0" usemap="#____gnu__cxx_1_1____pool__alloc__base_inherit__map" alt="Inheritance graph"/></div> <map name="____gnu__cxx_1_1____pool__alloc__base_inherit__map" id="____gnu__cxx_1_1____pool__alloc__base_inherit__map"> <area shape="rect" id="node3" href="a00014.html" title="Allocator using a memory pool with a single lock." alt="" coords="5,83,205,112"/></map> <center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div> <p><a href="a01400.html">List of all members.</a></p> <h2><a name="pro-types"></a> Protected Types</h2> <ul> <li>enum { <b>_S_align</b> } <li>enum { <b>_S_max_bytes</b> } <li>enum { <b>_S_free_list_size</b> } </ul> <h2><a name="pro-methods"></a> Protected Member Functions</h2> <ul> <li><a class="anchor" id="a437ebec364f2b71def39561c0f445c88"></a><!-- doxytag: member="__gnu_cxx::__pool_alloc_base::_M_allocate_chunk" ref="a437ebec364f2b71def39561c0f445c88" args="(size_t __n, int &__nobjs)" --> char * <b>_M_allocate_chunk</b> (size_t __n, int &__nobjs) <li><a class="anchor" id="a25fba084d4edbeb081f7ec4f66d34874"></a><!-- doxytag: member="__gnu_cxx::__pool_alloc_base::_M_get_free_list" ref="a25fba084d4edbeb081f7ec4f66d34874" args="(size_t __bytes)" --> _Obj *volatile <b>_M_get_free_list</b> (size_t __bytes) throw () <li><a class="anchor" id="a2a11cb1cb0a7b02698302e85bf7c5605"></a><!-- doxytag: member="__gnu_cxx::__pool_alloc_base::_M_get_mutex" ref="a2a11cb1cb0a7b02698302e85bf7c5605" args="()" --> __mutex & <b>_M_get_mutex</b> () throw () <li><a class="anchor" id="a79b8ac714623beecdb16a0183a4ddb8a"></a><!-- doxytag: member="__gnu_cxx::__pool_alloc_base::_M_refill" ref="a79b8ac714623beecdb16a0183a4ddb8a" args="(size_t __n)" --> void * <b>_M_refill</b> (size_t __n) <li><a class="anchor" id="a36737e4e3f026a1cf9330a843e8db9e0"></a><!-- doxytag: member="__gnu_cxx::__pool_alloc_base::_M_round_up" ref="a36737e4e3f026a1cf9330a843e8db9e0" args="(size_t __bytes)" --> size_t <b>_M_round_up</b> (size_t __bytes) </ul> <h2><a name="pro-static-attribs"></a> Static Protected Attributes</h2> <ul> <li><a class="anchor" id="aaa9fb068ac117f64abf3c41ea23a56fe"></a><!-- doxytag: member="__gnu_cxx::__pool_alloc_base::_S_end_free" ref="aaa9fb068ac117f64abf3c41ea23a56fe" args="" --> static char * <b>_S_end_free</b> <li><a class="anchor" id="a3221bb47712a4226c92c201c2a01aee8"></a><!-- doxytag: member="__gnu_cxx::__pool_alloc_base::_S_free_list" ref="a3221bb47712a4226c92c201c2a01aee8" args="[_S_free_list_size]" --> static _Obj *volatile <b>_S_free_list</b> [_S_free_list_size] <li><a class="anchor" id="a3241fb6d3d570a0eefeb77b634f5251c"></a><!-- doxytag: member="__gnu_cxx::__pool_alloc_base::_S_heap_size" ref="a3241fb6d3d570a0eefeb77b634f5251c" args="" --> static size_t <b>_S_heap_size</b> <li><a class="anchor" id="a120f643bfb41aedd3e591840e8910784"></a><!-- doxytag: member="__gnu_cxx::__pool_alloc_base::_S_start_free" ref="a120f643bfb41aedd3e591840e8910784" args="" --> static char * <b>_S_start_free</b> </ul> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>Base class for <a class="el" href="a00014.html" title="Allocator using a memory pool with a single lock.">__pool_alloc</a>. </p> <p>Uses various allocators to fulfill underlying requests (and makes as few requests as possible when in default high-speed pool mode).</p> <p>Important implementation properties: 0. If globally mandated, then allocate objects from new 1. If the clients request an object of size > _S_max_bytes, the resulting object will be obtained directly from new 2. In all other cases, we allocate an object of size exactly _S_round_up(requested_size). Thus the client has enough size information that we can return the object to the proper free list without permanently losing part of the object. </p> <p>Definition at line <a class="el" href="a00976_source.html#l00076">76</a> of file <a class="el" href="a00976_source.html">pool_allocator.h</a>.</p> </div><hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="a00976_source.html">pool_allocator.h</a></li> </ul> </div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="a01125.html">__gnu_cxx</a> </li> <li class="navelem"><a class="el" href="a00015.html">__pool_alloc_base</a> </li> <li class="footer">Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </li> </ul> </div> </body> </html>