Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > c74ab286c3d46f9b82671d206e43a74b > files > 39

libstdc++-docs-4.6.3-2.fc15.i686.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>libstdc++: __gnu_cxx::bitmap_allocator&lt; _Tp &gt; Class Template 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('a00033.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-types">Private Types</a> &#124;
<a href="#pri-methods">Private Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">__gnu_cxx::bitmap_allocator&lt; _Tp &gt; Class Template Reference<div class="ingroups"><a class="el" href="a01187.html">Allocators</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="__gnu_cxx::bitmap_allocator" --><!-- doxytag: inherits="__gnu_cxx::free_list" -->
<p>Bitmap Allocator, primary template.  
 <a href="a00033.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for __gnu_cxx::bitmap_allocator&lt; _Tp &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="a01423.png" border="0" usemap="#____gnu__cxx_1_1bitmap__allocator_3_01___tp_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="____gnu__cxx_1_1bitmap__allocator_3_01___tp_01_4_inherit__map" id="____gnu__cxx_1_1bitmap__allocator_3_01___tp_01_4_inherit__map">
<area shape="rect" id="node2" href="a00045.html" title="The free list class for managing chunks of memory to be given to and returned by the bitmap_allocator..." alt="" coords="49,5,180,35"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a01424.html">List of all members.</a></p>
<h2><a name="pub-types"></a>
Public Types</h2>
<ul>
<li><a class="anchor" id="a7c1087682c1149172d29f490ada40a33"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::__mutex_type" ref="a7c1087682c1149172d29f490ada40a33" args="" -->
typedef free_list::__mutex_type <b>__mutex_type</b>
<li><a class="anchor" id="afe0996a5dde6ea45d53e2a0df4a2c26f"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::const_pointer" ref="afe0996a5dde6ea45d53e2a0df4a2c26f" args="" -->
typedef const _Tp * <b>const_pointer</b>
<li><a class="anchor" id="a1c610b2da4e6f51a465166d0686f632a"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::const_reference" ref="a1c610b2da4e6f51a465166d0686f632a" args="" -->
typedef const _Tp &amp; <b>const_reference</b>
<li><a class="anchor" id="af5ab375919fd01999ce7ff7b7b151923"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::difference_type" ref="af5ab375919fd01999ce7ff7b7b151923" args="" -->
typedef ptrdiff_t <b>difference_type</b>
<li><a class="anchor" id="a857a3f720ebea60a3db13c37da833906"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::pointer" ref="a857a3f720ebea60a3db13c37da833906" args="" -->
typedef _Tp * <b>pointer</b>
<li><a class="anchor" id="a3d6e37bbbb2ca0bc8571aa7644a6a991"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::reference" ref="a3d6e37bbbb2ca0bc8571aa7644a6a991" args="" -->
typedef _Tp &amp; <b>reference</b>
<li><a class="anchor" id="a70a426139d6b1c608bff449b157c5e3a"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::size_type" ref="a70a426139d6b1c608bff449b157c5e3a" args="" -->
typedef size_t <b>size_type</b>
<li><a class="anchor" id="a398db4825aa300b970f2a7df6f3eb08d"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::value_type" ref="a398db4825aa300b970f2a7df6f3eb08d" args="" -->
typedef _Tp <b>value_type</b>
</ul>
<h2><a name="pub-methods"></a>
Public Member Functions</h2>
<ul>
<li><a class="anchor" id="a23de12b30afdc77c991d72b5261b3156"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::bitmap_allocator" ref="a23de12b30afdc77c991d72b5261b3156" args="(const bitmap_allocator &amp;)" -->
<b>bitmap_allocator</b> (const <a class="el" href="a00033.html">bitmap_allocator</a> &amp;)
<li><a class="anchor" id="a713c2455c59e9aafcc16546d97ae094d"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::bitmap_allocator" ref="a713c2455c59e9aafcc16546d97ae094d" args="(const bitmap_allocator&lt; _Tp1 &gt; &amp;)" -->
template&lt;typename _Tp1 &gt; <b>bitmap_allocator</b> (const <a class="el" href="a00033.html">bitmap_allocator</a>&lt; _Tp1 &gt; &amp;)  throw ()
<li>pointer <a class="el" href="a00033.html#ac77b949a33d56571818a29d403d29c0f">_M_allocate_single_object</a> ()  throw (std::bad_alloc)
<li>void <a class="el" href="a00033.html#ae0ef4419b8cbba9cb3dd18f54767011b">_M_deallocate_single_object</a> (pointer __p)  throw ()
<li><a class="anchor" id="a9410449853bab55d416c691eb7779b69"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::address" ref="a9410449853bab55d416c691eb7779b69" args="(const_reference __r) const " -->
const_pointer <b>address</b> (const_reference __r) const 
<li><a class="anchor" id="a507ae8e130cde4328ca0261519f0b189"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::address" ref="a507ae8e130cde4328ca0261519f0b189" args="(reference __r) const " -->
pointer <b>address</b> (reference __r) const 
<li><a class="anchor" id="aa0cb2fb58340bb902e9cc2b26e25d9b6"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::allocate" ref="aa0cb2fb58340bb902e9cc2b26e25d9b6" args="(size_type __n, typename bitmap_allocator&lt; void &gt;::const_pointer)" -->
pointer <b>allocate</b> (size_type __n, typename <a class="el" href="a00033.html">bitmap_allocator</a>&lt; void &gt;::const_pointer)
<li><a class="anchor" id="a28cfcee98ba6030d18f85a39eedaf019"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::allocate" ref="a28cfcee98ba6030d18f85a39eedaf019" args="(size_type __n)" -->
pointer <b>allocate</b> (size_type __n)
<li><a class="anchor" id="afb3a167b58fe35e74dd1b7cf82b8e1fb"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::construct" ref="afb3a167b58fe35e74dd1b7cf82b8e1fb" args="(pointer __p, _Args &amp;&amp;...__args)" -->
template&lt;typename... _Args&gt; void <b>construct</b> (pointer __p, _Args &amp;&amp;...__args)
<li><a class="anchor" id="a21b54b4dfbbb761180ed69540ca2b087"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::construct" ref="a21b54b4dfbbb761180ed69540ca2b087" args="(pointer __p, const_reference __data)" -->
void <b>construct</b> (pointer __p, const_reference __data)
<li><a class="anchor" id="abd404baeaf6ca9e8b3bbd6150998a5c6"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::deallocate" ref="abd404baeaf6ca9e8b3bbd6150998a5c6" args="(pointer __p, size_type __n)" -->
void <b>deallocate</b> (pointer __p, size_type __n)  throw ()
<li><a class="anchor" id="a34efabaf9380a3d260dd63db4b27473b"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::destroy" ref="a34efabaf9380a3d260dd63db4b27473b" args="(pointer __p)" -->
void <b>destroy</b> (pointer __p)
<li><a class="anchor" id="a0b875dea006aeeb327874d9c9b110c15"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::max_size" ref="a0b875dea006aeeb327874d9c9b110c15" args="() const " -->
size_type <b>max_size</b> () const   throw ()
</ul>
<h2><a name="pri-types"></a>
Private Types</h2>
<ul>
<li><a class="anchor" id="a53ca9eae5cfd27faf97bf8045614242e"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::iterator" ref="a53ca9eae5cfd27faf97bf8045614242e" args="" -->
typedef vector_type::iterator <b>iterator</b>
<li><a class="anchor" id="ad5a440e53d4ff6f09d98d7dbcd491dac"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::vector_type" ref="ad5a440e53d4ff6f09d98d7dbcd491dac" args="" -->
typedef <br class="typebreak"/>
<a class="el" href="a00006.html">__detail::__mini_vector</a><br class="typebreak"/>
&lt; value_type &gt; <b>vector_type</b>
</ul>
<h2><a name="pri-methods"></a>
Private Member Functions</h2>
<ul>
<li>void <a class="el" href="a00045.html#aa818ab5db6cd984caf19488acd99e773">_M_clear</a> ()
<li>size_t * <a class="el" href="a00045.html#a97b71b00432393bcd261e184762ca39a">_M_get</a> (size_t __sz)  throw (std::bad_alloc)
<li>void <a class="el" href="a00045.html#ae74ae06db0ef7dad012081a3c73e6483">_M_insert</a> (size_t *__addr)  throw ()
</ul>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename _Tp&gt;<br/>
class __gnu_cxx::bitmap_allocator&lt; _Tp &gt;</h3>

<p>Bitmap Allocator, primary template. </p>

<p>Definition at line <a class="el" href="a00774_source.html#l00691">691</a> of file <a class="el" href="a00774_source.html">bitmap_allocator.h</a>.</p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac77b949a33d56571818a29d403d29c0f"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::_M_allocate_single_object" ref="ac77b949a33d56571818a29d403d29c0f" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">pointer <a class="el" href="a00033.html">__gnu_cxx::bitmap_allocator</a>&lt; _Tp &gt;::_M_allocate_single_object </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>  throw (<a class="el" href="a00389.html">std::bad_alloc</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Allocates memory for a single object of size sizeof(_Tp). </p>
<dl><dt><b>Exceptions:</b></dt><dd>
  <table class="exception">
    <tr><td class="paramname">std::bad_alloc.</td><td>If memory can not be allocated.</td></tr>
  </table>
  </dd>
</dl>
<p>Complexity: Worst case complexity is O(N), but that is hardly ever hit. If and when this particular case is encountered, the next few cases are guaranteed to have a worst case complexity of O(1)! That's why this function performs very well on average. You can consider this function to have a complexity referred to commonly as: Amortized Constant time. </p>

<p>Definition at line <a class="el" href="a00774_source.html#l00825">825</a> of file <a class="el" href="a00774_source.html">bitmap_allocator.h</a>.</p>

<p>References <a class="el" href="a00774_source.html#l00492">__gnu_cxx::__detail::__bit_allocate()</a>, <a class="el" href="a00774_source.html#l00280">__gnu_cxx::__detail::__num_bitmaps()</a>, and <a class="el" href="a00774_source.html#l00517">__gnu_cxx::_Bit_scan_forward()</a>.</p>

</div>
</div>
<a class="anchor" id="ae0ef4419b8cbba9cb3dd18f54767011b"></a><!-- doxytag: member="__gnu_cxx::bitmap_allocator::_M_deallocate_single_object" ref="ae0ef4419b8cbba9cb3dd18f54767011b" args="(pointer __p)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="a00033.html">__gnu_cxx::bitmap_allocator</a>&lt; _Tp &gt;::_M_deallocate_single_object </td>
          <td>(</td>
          <td class="paramtype">pointer&#160;</td>
          <td class="paramname"><em>__p</em></td><td>)</td>
          <td>  throw ()<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Deallocates memory that belongs to a single object of size sizeof(_Tp). </p>
<p>Complexity: O(lg(N)), but the worst case is not hit often! This is because containers usually deallocate memory close to each other and this case is handled in O(1) time by the deallocate function. </p>

<p>Definition at line <a class="el" href="a00774_source.html#l00915">915</a> of file <a class="el" href="a00774_source.html">bitmap_allocator.h</a>.</p>

<p>References <a class="el" href="a00774_source.html#l00503">__gnu_cxx::__detail::__bit_free()</a>, <a class="el" href="a00774_source.html#l00280">__gnu_cxx::__detail::__num_bitmaps()</a>, <a class="el" href="a01045_source.html#l01505">std::__rotate()</a>, and <a class="el" href="a00774_source.html#l00635">__gnu_cxx::free_list::_M_insert()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00774_source.html">bitmap_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="a00033.html">bitmap_allocator</a>      </li>
      <li class="footer">Generated by&#160;
<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>