early-access version 3088

This commit is contained in:
pineappleEA
2022-11-05 15:35:56 +01:00
parent 4e4fc25ce3
commit b601909c6d
35519 changed files with 5996896 additions and 860 deletions

View File

@@ -0,0 +1,49 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Macro BOOST_POOL_VALIDATE_INTERNALS</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Boost.Pool">
<link rel="up" href="header/boost/pool/simple_segregated_storage_hpp.html" title="Header &lt;boost/pool/simple_segregated_storage.hpp&gt;">
<link rel="prev" href="boost/simple_segregated_storage.html" title="Class template simple_segregated_storage">
<link rel="next" href="header/boost/pool/singleton_pool_hpp.html" title="Header &lt;boost/pool/singleton_pool.hpp&gt;">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost/simple_segregated_storage.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="header/boost/pool/simple_segregated_storage_hpp.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="header/boost/pool/singleton_pool_hpp.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="BOOST_POOL_VALIDATE_INTERNALS"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Macro BOOST_POOL_VALIDATE_INTERNALS</span></h2>
<p>BOOST_POOL_VALIDATE_INTERNALS</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="header/boost/pool/simple_segregated_storage_hpp.html" title="Header &lt;boost/pool/simple_segregated_storage.hpp&gt;">boost/pool/simple_segregated_storage.hpp</a>&gt;
</span>BOOST_POOL_VALIDATE_INTERNALS</pre></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost/simple_segregated_storage.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="header/boost/pool/simple_segregated_storage_hpp.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="header/boost/pool/singleton_pool_hpp.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,69 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct default_user_allocator_malloc_free</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../header/boost/pool/pool_hpp.html" title="Header &lt;boost/pool/pool.hpp&gt;">
<link rel="prev" href="default_user_allocator_new_delete.html" title="Struct default_user_allocator_new_delete">
<link rel="next" href="pool.html" title="Class template pool">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="default_user_allocator_new_delete.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pool.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.default_user_allocator_malloc_free"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct default_user_allocator_malloc_free</span></h2>
<p>boost::default_user_allocator_malloc_free &#8212; <a href="../boost_pool/pool/pooling.html#boost_pool.pool.pooling.user_allocator" target="_top">UserAllocator</a> used as template parameter for <a class="link" href="pool.html" title="Class template pool">pool</a> and <a class="link" href="object_pool.html" title="Class template object_pool">object_pool</a>. Uses malloc and free internally. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../header/boost/pool/pool_hpp.html" title="Header &lt;boost/pool/pool.hpp&gt;">boost/pool/pool.hpp</a>&gt;
</span>
<span class="keyword">struct</span> <a class="link" href="default_user_allocator_malloc_free.html" title="Struct default_user_allocator_malloc_free">default_user_allocator_malloc_free</a> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="boost.default_user_allocator_malloc_free.size_type"></a><span class="identifier">size_type</span><span class="special">;</span> <span class="comment">// An unsigned integral type that can represent the size of the largest object to be allocated. </span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <a name="boost.default_user_allocator_malloc_free.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span> <span class="comment">// A signed integral type that can represent the difference of any two pointers. </span>
<span class="comment">// <a class="link" href="default_user_allocator_malloc_free.html#id376945-bb">public static functions</a></span>
<span class="keyword">static</span> <span class="keyword">char</span> <span class="special">*</span> <a class="link" href="default_user_allocator_malloc_free.html#id376947-bb"><span class="identifier">malloc</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="default_user_allocator_malloc_free.html#id376958-bb"><span class="identifier">free</span></a><span class="special">(</span><span class="keyword">char</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id927952"></a><h2>Description</h2>
<div class="refsect2">
<a name="id927956"></a><h3>
<a name="id376945-bb"></a><code class="computeroutput">default_user_allocator_malloc_free</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="keyword">char</span> <span class="special">*</span> <a name="id376947-bb"></a><span class="identifier">malloc</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> bytes<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="id376958-bb"></a><span class="identifier">free</span><span class="special">(</span><span class="keyword">char</span> <span class="special">*</span><span class="keyword">const</span> block<span class="special">)</span><span class="special">;</span></pre></li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="default_user_allocator_new_delete.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pool.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,83 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct default_user_allocator_new_delete</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../header/boost/pool/pool_hpp.html" title="Header &lt;boost/pool/pool.hpp&gt;">
<link rel="prev" href="../header/boost/pool/pool_hpp.html" title="Header &lt;boost/pool/pool.hpp&gt;">
<link rel="next" href="default_user_allocator_malloc_free.html" title="Struct default_user_allocator_malloc_free">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="default_user_allocator_malloc_free.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.default_user_allocator_new_delete"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct default_user_allocator_new_delete</span></h2>
<p>boost::default_user_allocator_new_delete &#8212; Allocator used as the default template parameter for a <a href="../boost_pool/pool/pooling.html#boost_pool.pool.pooling.user_allocator" target="_top">UserAllocator</a> template parameter. Uses new and delete. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../header/boost/pool/pool_hpp.html" title="Header &lt;boost/pool/pool.hpp&gt;">boost/pool/pool.hpp</a>&gt;
</span>
<span class="keyword">struct</span> <a class="link" href="default_user_allocator_new_delete.html" title="Struct default_user_allocator_new_delete">default_user_allocator_new_delete</a> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="boost.default_user_allocator_new_delete.size_type"></a><span class="identifier">size_type</span><span class="special">;</span> <span class="comment">// An unsigned integral type that can represent the size of the largest object to be allocated. </span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <a name="boost.default_user_allocator_new_delete.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span> <span class="comment">// A signed integral type that can represent the difference of any two pointers. </span>
<span class="comment">// <a class="link" href="default_user_allocator_new_delete.html#id376878-bb">public static functions</a></span>
<span class="keyword">static</span> <span class="keyword">char</span> <span class="special">*</span> <a class="link" href="default_user_allocator_new_delete.html#id376880-bb"><span class="identifier">malloc</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="default_user_allocator_new_delete.html#id376895-bb"><span class="identifier">free</span></a><span class="special">(</span><span class="keyword">char</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id927604"></a><h2>Description</h2>
<div class="refsect2">
<a name="id927608"></a><h3>
<a name="id376878-bb"></a><code class="computeroutput">default_user_allocator_new_delete</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">char</span> <span class="special">*</span> <a name="id376880-bb"></a><span class="identifier">malloc</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> bytes<span class="special">)</span><span class="special">;</span></pre>
<p>Attempts to allocate n bytes from the system. Returns 0 if out-of-memory </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="id376895-bb"></a><span class="identifier">free</span><span class="special">(</span><span class="keyword">char</span> <span class="special">*</span><span class="keyword">const</span> block<span class="special">)</span><span class="special">;</span></pre>
<p>Attempts to de-allocate block.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>Block must have been previously returned from a call to UserAllocator::malloc. </p></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="default_user_allocator_malloc_free.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,177 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template fast_pool_allocator</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">
<link rel="prev" href="fast_pool_allocator_tag.html" title="Struct fast_pool_allocator_tag">
<link rel="next" href="fast_pool_allocator/rebind.html" title="Struct template rebind">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="fast_pool_allocator_tag.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fast_pool_allocator/rebind.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.fast_pool_allocator"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template fast_pool_allocator</span></h2>
<p>boost::fast_pool_allocator &#8212; A C++ Standard Library conforming allocator geared towards allocating single chunks. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">boost/pool/pool_alloc.hpp</a>&gt;
</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> UserAllocator<span class="special">,</span> <span class="keyword">typename</span> Mutex<span class="special">,</span>
<span class="keyword">unsigned</span> NextSize<span class="special">,</span> <span class="keyword">unsigned</span> MaxSize<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <span class="identifier">T</span> <a name="boost.fast_pool_allocator.value_type"></a><span class="identifier">value_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">UserAllocator</span> <a name="boost.fast_pool_allocator.user_allocator"></a><span class="identifier">user_allocator</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">Mutex</span> <a name="boost.fast_pool_allocator.mutex"></a><span class="identifier">mutex</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="special">*</span> <a name="boost.fast_pool_allocator.pointer"></a><span class="identifier">pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">*</span> <a name="boost.fast_pool_allocator.const_pointer"></a><span class="identifier">const_pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="special">&amp;</span> <a name="boost.fast_pool_allocator.reference"></a><span class="identifier">reference</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">&amp;</span> <a name="boost.fast_pool_allocator.const_reference"></a><span class="identifier">const_reference</span><span class="special">;</span>
<span class="keyword">typedef</span> <a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">size_type</span> <a name="boost.fast_pool_allocator.size_type"></a><span class="identifier">size_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">difference_type</span> <a name="boost.fast_pool_allocator.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span>
<span class="comment">// member classes/structs/unions</span>
<span class="comment">// Nested class rebind allows for transformation from fast_pool_allocator&lt;T&gt;
// to fast_pool_allocator&lt;U&gt;.</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="fast_pool_allocator/rebind.html" title="Struct template rebind">rebind</a> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <a class="link" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span> <span class="special">&gt;</span> <a class="link" href="fast_pool_allocator/rebind.html#boost.fast_pool_allocator.rebind.other"><span class="identifier">other</span></a><span class="special">;</span>
<span class="special">}</span><span class="special">;</span>
<span class="comment">// <a class="link" href="fast_pool_allocator.html#boost.fast_pool_allocatorconstruct-copy-destruct">construct/copy/destruct</a></span>
<a class="link" href="fast_pool_allocator.html#id378382-bb"><span class="identifier">fast_pool_allocator</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span>
<a class="link" href="fast_pool_allocator.html#id378396-bb"><span class="identifier">fast_pool_allocator</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="fast_pool_allocator.html#id378321-bb">public member functions</a></span>
<span class="keyword">void</span> <a class="link" href="fast_pool_allocator.html#id378323-bb"><span class="identifier">construct</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="fast_pool_allocator.html#id378339-bb"><span class="identifier">destroy</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">bool</span> <a class="link" href="fast_pool_allocator.html#id378353-bb"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">bool</span> <a class="link" href="fast_pool_allocator.html#id378368-bb"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="comment">// <a class="link" href="fast_pool_allocator.html#id378425-bb">public static functions</a></span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="fast_pool_allocator.html#id378428-bb"><span class="identifier">address</span></a><span class="special">(</span><span class="identifier">reference</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">const_pointer</span> <a class="link" href="fast_pool_allocator.html#id378438-bb"><span class="identifier">address</span></a><span class="special">(</span><span class="identifier">const_reference</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">size_type</span> <a class="link" href="fast_pool_allocator.html#id378449-bb"><span class="identifier">max_size</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="fast_pool_allocator.html#id378455-bb"><span class="identifier">allocate</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="fast_pool_allocator.html#id378466-bb"><span class="identifier">allocate</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="fast_pool_allocator.html#id378485-bb"><span class="identifier">allocate</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="fast_pool_allocator.html#id378495-bb"><span class="identifier">deallocate</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="fast_pool_allocator.html#id378514-bb"><span class="identifier">deallocate</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// public data members</span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="identifier">next_size</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id937146"></a><h2>Description</h2>
<p>While class template <code class="computeroutput"><a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a></code> is a more general-purpose solution geared towards efficiently servicing requests for any number of contiguous chunks, <code class="computeroutput"><a class="link" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a></code> is also a general-purpose solution, but is geared towards efficiently servicing requests for one chunk at a time; it will work for contiguous chunks, but not as well as <code class="computeroutput"><a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a></code>.</p>
<p>If you are seriously concerned about performance, use <code class="computeroutput"><a class="link" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a></code> when dealing with containers such as <code class="computeroutput">std::list</code>, and use <code class="computeroutput"><a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a></code> when dealing with containers such as <code class="computeroutput">std::vector</code>.</p>
<p>The template parameters are defined as follows:</p>
<p><span class="bold"><strong>T</strong></span> Type of object to allocate/deallocate.</p>
<p><span class="bold"><strong>UserAllocator</strong></span>. Defines the method that the underlying Pool will use to allocate memory from the system. See <a href="../boost_pool/pool/pooling.html#boost_pool.pool.pooling.user_allocator" target="_top">User Allocators</a> for details.</p>
<p><span class="bold"><strong>Mutex</strong></span> Allows the user to determine the type of synchronization to be used on the underlying <code class="computeroutput"><a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a></code>.</p>
<p><span class="bold"><strong>NextSize</strong></span> The value of this parameter is passed to the underlying Pool when it is created.</p>
<p><span class="bold"><strong>MaxSize</strong></span> Limit on the maximum size used.</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>The underlying <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a> used by the this allocator constructs a pool instance that <span class="bold"><strong>is never freed</strong></span>. This means that memory allocated by the allocator can be still used after main() has completed, but may mean that some memory checking programs will complain about leaks. </p></td></tr>
</table></div>
<p>
</p>
<div class="refsect2">
<a name="id937261"></a><h3>
<a name="boost.fast_pool_allocatorconstruct-copy-destruct"></a><code class="computeroutput">fast_pool_allocator</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="id378382-bb"></a><span class="identifier">fast_pool_allocator</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Ensures construction of the underlying <code class="computeroutput"><a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a></code> IFF an instance of this allocator is constructed during global initialization. See ticket #2359 for a complete explanation at <a href="http://svn.boost.org/trac/boost/ticket/2359" target="_top">http://svn.boost.org/trac/boost/ticket/2359</a> . </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span>
<a name="id378396-bb"></a><span class="identifier">fast_pool_allocator</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>Ensures construction of the underlying <code class="computeroutput"><a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a></code> IFF an instance of this allocator is constructed during global initialization. See ticket #2359 for a complete explanation at <a href="http://svn.boost.org/trac/boost/ticket/2359" target="_top">http://svn.boost.org/trac/boost/ticket/2359</a> . </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id937425"></a><h3>
<a name="id378321-bb"></a><code class="computeroutput">fast_pool_allocator</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="id378323-bb"></a><span class="identifier">construct</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span> ptr<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">&amp;</span> t<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id378339-bb"></a><span class="identifier">destroy</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span> ptr<span class="special">)</span><span class="special">;</span></pre>
<p>Destroy ptr using destructor. </p>
</li>
<li class="listitem"><pre class="literallayout"><span class="keyword">bool</span> <a name="id378353-bb"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">bool</span> <a name="id378368-bb"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="id937633"></a><h3>
<a name="id378425-bb"></a><code class="computeroutput">fast_pool_allocator</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="id378428-bb"></a><span class="identifier">address</span><span class="special">(</span><span class="identifier">reference</span> r<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">const_pointer</span> <a name="id378438-bb"></a><span class="identifier">address</span><span class="special">(</span><span class="identifier">const_reference</span> s<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">size_type</span> <a name="id378449-bb"></a><span class="identifier">max_size</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="id378455-bb"></a><span class="identifier">allocate</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="id378466-bb"></a><span class="identifier">allocate</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">,</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> const<span class="special">)</span><span class="special">;</span></pre>
<p>Allocate memory . </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="id378485-bb"></a><span class="identifier">allocate</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Allocate memory. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="id378495-bb"></a><span class="identifier">deallocate</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span> ptr<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
<p>Deallocate memory. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="id378514-bb"></a><span class="identifier">deallocate</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span> ptr<span class="special">)</span><span class="special">;</span></pre>
<p>deallocate/free </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id938145"></a><h3>Specializations</h3>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><a class="link" href="fast_pool_allocator_void__UserAllocat_id378528.html" title="Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;">Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</a></p></li></ul></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="fast_pool_allocator_tag.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fast_pool_allocator/rebind.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,61 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct template rebind</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../fast_pool_allocator.html#id937146" title="Description">
<link rel="prev" href="../fast_pool_allocator.html" title="Class template fast_pool_allocator">
<link rel="next" href="../fast_pool_allocator_void__UserAllocat_id378528.html" title="Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../fast_pool_allocator.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../fast_pool_allocator.html#id937146"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../fast_pool_allocator_void__UserAllocat_id378528.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.fast_pool_allocator.rebind"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template rebind</span></h2>
<p>boost::fast_pool_allocator::rebind &#8212; Nested class rebind allows for transformation from fast_pool_allocator&lt;T&gt; to fast_pool_allocator&lt;U&gt;. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">boost/pool/pool_alloc.hpp</a>&gt;
</span>
<span class="comment">// Nested class rebind allows for transformation from fast_pool_allocator&lt;T&gt;
// to fast_pool_allocator&lt;U&gt;.</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="rebind.html" title="Struct template rebind">rebind</a> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <a class="link" href="../fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span> <span class="special">&gt;</span> <a name="boost.fast_pool_allocator.rebind.other"></a><span class="identifier">other</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id938139"></a><h2>Description</h2>
<p>Nested class rebind allows for transformation from fast_pool_allocator&lt;T&gt; to fast_pool_allocator&lt;U&gt; via the member typedef other. </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../fast_pool_allocator.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../fast_pool_allocator.html#id937146"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../fast_pool_allocator_void__UserAllocat_id378528.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,51 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct fast_pool_allocator_tag</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">
<link rel="prev" href="pool_allocator_void__UserAllocator__M_id378014/rebind.html" title="Struct template rebind">
<link rel="next" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="pool_allocator_void__UserAllocator__M_id378014/rebind.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fast_pool_allocator.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.fast_pool_allocator_tag"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct fast_pool_allocator_tag</span></h2>
<p>boost::fast_pool_allocator_tag &#8212; Simple tag type used by <a class="link" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a> as a template parameter to the underlying <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a>. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">boost/pool/pool_alloc.hpp</a>&gt;
</span>
<span class="keyword">struct</span> <a class="link" href="fast_pool_allocator_tag.html" title="Struct fast_pool_allocator_tag">fast_pool_allocator_tag</a> <span class="special">{</span>
<span class="special">}</span><span class="special">;</span></pre></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="pool_allocator_void__UserAllocator__M_id378014/rebind.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fast_pool_allocator.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,71 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">
<link rel="prev" href="fast_pool_allocator/rebind.html" title="Struct template rebind">
<link rel="next" href="fast_pool_allocator_void__UserAllocat_id378528/rebind.html" title="Struct template rebind">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="fast_pool_allocator/rebind.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fast_pool_allocator_void__UserAllocat_id378528/rebind.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.fast_pool_allocator_void,_UserAllocat_id378528"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></h2>
<p>boost::fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt; &#8212; Specialization of fast_pool_allocator&lt;void&gt;. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">boost/pool/pool_alloc.hpp</a>&gt;
</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> UserAllocator<span class="special">,</span> <span class="keyword">typename</span> Mutex<span class="special">,</span> <span class="keyword">unsigned</span> NextSize<span class="special">,</span>
<span class="keyword">unsigned</span> MaxSize<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="fast_pool_allocator_void__UserAllocat_id378528.html" title="Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;">fast_pool_allocator</a><span class="special">&lt;</span><span class="keyword">void</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span><span class="special">&gt;</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <span class="keyword">void</span> <span class="special">*</span> <a name="boost.fast_pool_allocator_void,_UserAllocat_id378528.pointer"></a><span class="identifier">pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <a name="boost.fast_pool_allocator_void,_UserAllocat_id378528.const_pointer"></a><span class="identifier">const_pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">void</span> <a name="boost.fast_pool_allocator_void,_UserAllocat_id378528.value_type"></a><span class="identifier">value_type</span><span class="special">;</span>
<span class="comment">// member classes/structs/unions</span>
<span class="comment">// Nested class rebind allows for transformation from fast_pool_allocator&lt;T&gt;
// to fast_pool_allocator&lt;U&gt;.</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="fast_pool_allocator_void__UserAllocat_id378528/rebind.html" title="Struct template rebind">rebind</a> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <a class="link" href="fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span> <span class="special">&gt;</span> <a class="link" href="fast_pool_allocator_void__UserAllocat_id378528/rebind.html#boost.fast_pool_allocator_void,_UserAllocat_id378528.rebind.other"><span class="identifier">other</span></a><span class="special">;</span>
<span class="special">}</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id938511"></a><h2>Description</h2>
<p>Specialization of fast_pool_allocator&lt;void&gt; required to make the allocator standard-conforming. </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="fast_pool_allocator/rebind.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="fast_pool_allocator_void__UserAllocat_id378528/rebind.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,61 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct template rebind</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../fast_pool_allocator_void__UserAllocat_id378528.html#id938511" title="Description">
<link rel="prev" href="../fast_pool_allocator_void__UserAllocat_id378528.html" title="Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;">
<link rel="next" href="../../header/boost/pool/poolfwd_hpp.html" title="Header &lt;boost/pool/poolfwd.hpp&gt;">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../fast_pool_allocator_void__UserAllocat_id378528.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../fast_pool_allocator_void__UserAllocat_id378528.html#id938511"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../header/boost/pool/poolfwd_hpp.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.fast_pool_allocator_void,_UserAllocat_id378528.rebind"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template rebind</span></h2>
<p>boost::fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;::rebind &#8212; Nested class rebind allows for transformation from fast_pool_allocator&lt;T&gt; to fast_pool_allocator&lt;U&gt;. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">boost/pool/pool_alloc.hpp</a>&gt;
</span>
<span class="comment">// Nested class rebind allows for transformation from fast_pool_allocator&lt;T&gt;
// to fast_pool_allocator&lt;U&gt;.</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="rebind.html" title="Struct template rebind">rebind</a> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <a class="link" href="../fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span> <span class="special">&gt;</span> <a name="boost.fast_pool_allocator_void,_UserAllocat_id378528.rebind.other"></a><span class="identifier">other</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id938665"></a><h2>Description</h2>
<p>Nested class rebind allows for transformation from fast_pool_allocator&lt;T&gt; to fast_pool_allocator&lt;U&gt; via the member typedef other. </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../fast_pool_allocator_void__UserAllocat_id378528.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../fast_pool_allocator_void__UserAllocat_id378528.html#id938511"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../header/boost/pool/poolfwd_hpp.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,285 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template object_pool</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../header/boost/pool/object_pool_hpp.html" title="Header &lt;boost/pool/object_pool.hpp&gt;">
<link rel="prev" href="../header/boost/pool/object_pool_hpp.html" title="Header &lt;boost/pool/object_pool.hpp&gt;">
<link rel="next" href="../header/boost/pool/pool_hpp.html" title="Header &lt;boost/pool/pool.hpp&gt;">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../header/boost/pool/object_pool_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/object_pool_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.object_pool"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template object_pool</span></h2>
<p>boost::object_pool &#8212; A template class that can be used for fast and efficient memory allocation of objects. It also provides automatic destruction of non-deallocated objects. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../header/boost/pool/object_pool_hpp.html" title="Header &lt;boost/pool/object_pool.hpp&gt;">boost/pool/object_pool.hpp</a>&gt;
</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> UserAllocator<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="object_pool.html" title="Class template object_pool">object_pool</a> <span class="special">:</span> <span class="keyword">protected</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">pool</span><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <span class="identifier">T</span> <a name="boost.object_pool.element_type"></a><span class="identifier">element_type</span><span class="special">;</span> <span class="comment">// ElementType. </span>
<span class="keyword">typedef</span> <span class="identifier">UserAllocator</span> <a name="boost.object_pool.user_allocator"></a><span class="identifier">user_allocator</span><span class="special">;</span> <span class="comment">// User allocator. </span>
<span class="keyword">typedef</span> <a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">size_type</span> <a name="boost.object_pool.size_type"></a><span class="identifier">size_type</span><span class="special">;</span> <span class="comment">// pool&lt;UserAllocator&gt;::size_type </span>
<span class="keyword">typedef</span> <a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">difference_type</span> <a name="boost.object_pool.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span> <span class="comment">// pool&lt;UserAllocator&gt;::difference_type </span>
<span class="comment">// <a class="link" href="object_pool.html#boost.object_poolconstruct-copy-destruct">construct/copy/destruct</a></span>
<span class="keyword">explicit</span> <a class="link" href="object_pool.html#id376821-bb"><span class="identifier">object_pool</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> <span class="special">=</span> <span class="number">32</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span>
<a class="link" href="object_pool.html#id376845-bb"><span class="special">~</span><span class="identifier">object_pool</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="object_pool.html#id376561-bb">protected member functions</a></span>
<a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <a class="link" href="object_pool.html#id376563-bb"><span class="identifier">store</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">const</span> <a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <a class="link" href="object_pool.html#id376584-bb"><span class="identifier">store</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="comment">// <a class="link" href="object_pool.html#id376605-bb">protected static functions</a></span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span><span class="special">&amp;</span> <a class="link" href="object_pool.html#id376608-bb"><span class="identifier">nextof</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="object_pool.html#id376626-bb">public member functions</a></span>
<span class="identifier">element_type</span> <span class="special">*</span> <a class="link" href="object_pool.html#id376628-bb"><span class="identifier">malloc</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="object_pool.html#id376644-bb"><span class="identifier">free</span></a><span class="special">(</span><span class="identifier">element_type</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">bool</span> <a class="link" href="object_pool.html#id376667-bb"><span class="identifier">is_from</span></a><span class="special">(</span><span class="identifier">element_type</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">element_type</span> <span class="special">*</span> <a class="link" href="object_pool.html#id376693-bb"><span class="identifier">construct</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Arg1<span class="special">,</span> <span class="special">...</span><span class="keyword">class</span> ArgN<span class="special">&gt;</span>
<span class="identifier">element_type</span> <span class="special">*</span> <a class="link" href="object_pool.html#id376706-bb"><span class="identifier">construct</span></a><span class="special">(</span><span class="identifier">Arg1</span> <span class="special">&amp;</span><span class="special">,</span> <span class="special">...</span><span class="identifier">ArgN</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="object_pool.html#id376765-bb"><span class="identifier">destroy</span></a><span class="special">(</span><span class="identifier">element_type</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="identifier">size_type</span> <a class="link" href="object_pool.html#id376790-bb"><span class="identifier">get_next_size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="object_pool.html#id376803-bb"><span class="identifier">set_next_size</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id926407"></a><h2>Description</h2>
<p><span class="bold"><strong>T</strong></span> The type of object to allocate/deallocate. T must have a non-throwing destructor.</p>
<p><span class="bold"><strong>UserAllocator</strong></span> Defines the allocator that the underlying Pool will use to allocate memory from the system. See <a href="../boost_pool/pool/pooling.html#boost_pool.pool.pooling.user_allocator" target="_top">User Allocators</a> for details.</p>
<p>Class <a class="link" href="object_pool.html" title="Class template object_pool">object_pool</a> is a template class that can be used for fast and efficient memory allocation of objects. It also provides automatic destruction of non-deallocated objects.</p>
<p>When the object pool is destroyed, then the destructor for type T is called for each allocated T that has not yet been deallocated. O(N).</p>
<p>Whenever an object of type ObjectPool needs memory from the system, it will request it from its UserAllocator template parameter. The amount requested is determined using a doubling algorithm; that is, each time more system memory is allocated, the amount of system memory requested is doubled. Users may control the doubling algorithm by the parameters passed to the object_pool's constructor. </p>
<div class="refsect2">
<a name="id926439"></a><h3>
<a name="boost.object_poolconstruct-copy-destruct"></a><code class="computeroutput">object_pool</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="id376821-bb"></a><span class="identifier">object_pool</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> arg_next_size <span class="special">=</span> <span class="number">32</span><span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">size_type</span> arg_max_size <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span></pre>
<p>Constructs a new (empty by default) ObjectPool.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>next_size != 0. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem"><pre class="literallayout"><a name="id376845-bb"></a><span class="special">~</span><span class="identifier">object_pool</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="id926560"></a><h3>
<a name="id376561-bb"></a><code class="computeroutput">object_pool</code> protected member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <a name="id376563-bb"></a><span class="identifier">store</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The underlying boost:: <a class="link" href="pool.html" title="Class template pool">pool</a> storage used by *this. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">const</span> <a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <a name="id376584-bb"></a><span class="identifier">store</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The underlying boost:: <a class="link" href="pool.html" title="Class template pool">pool</a> storage used by *this. </p></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id926710"></a><h3>
<a name="id376605-bb"></a><code class="computeroutput">object_pool</code> protected static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span><span class="special">&amp;</span> <a name="id376608-bb"></a><span class="identifier">nextof</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> ptr<span class="special">)</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The next memory block after ptr (for the sake of code readability :) </p></td>
</tr></tbody>
</table></div>
</li></ol></div>
</div>
<div class="refsect2">
<a name="id926791"></a><h3>
<a name="id376626-bb"></a><code class="computeroutput">object_pool</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="identifier">element_type</span> <span class="special">*</span> <a name="id376628-bb"></a><span class="identifier">malloc</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Allocates memory that can hold one object of type ElementType.</p>
<p>If out of memory, returns 0.</p>
<p>Amortized O(1). </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id376644-bb"></a><span class="identifier">free</span><span class="special">(</span><span class="identifier">element_type</span> <span class="special">*</span><span class="keyword">const</span> chunk<span class="special">)</span><span class="special">;</span></pre>
<p>De-Allocates memory that holds a chunk of type ElementType.</p>
<p>Note that p may not be 0.<br>
</p>
<p>Note that the destructor for p is not called. O(N). </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="id376667-bb"></a><span class="identifier">is_from</span><span class="special">(</span><span class="identifier">element_type</span> <span class="special">*</span><span class="keyword">const</span> chunk<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
Returns false if chunk was allocated from some other pool or may be returned as the result of a future allocation from some other pool.</p>
<p>Otherwise, the return value is meaningless.</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>This function may NOT be used to reliably test random pointer values!</p></td></tr>
</table></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>true if chunk was allocated from *this or may be returned as the result of a future allocation from *this.</p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">element_type</span> <span class="special">*</span> <a name="id376693-bb"></a><span class="identifier">construct</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A pointer to an object of type T, allocated in memory from the underlying pool and default constructed. The returned objected can be freed by a call to destroy. Otherwise the returned object will be automatically destroyed when *this is destroyed. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Arg1<span class="special">,</span> <span class="special">...</span><span class="keyword">class</span> ArgN<span class="special">&gt;</span>
<span class="identifier">element_type</span> <span class="special">*</span> <a name="id376706-bb"></a><span class="identifier">construct</span><span class="special">(</span><span class="identifier">Arg1</span> <span class="special">&amp;</span><span class="special">,</span> <span class="special">...</span><span class="identifier">ArgN</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>
</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>Since the number and type of arguments to this function is totally arbitrary, a simple system has been set up to automatically generate template construct functions. This system is based on the macro preprocessor m4, which is standard on UNIX systems and also available for Win32 systems.<br>
<br>
detail/pool_construct.m4, when run with m4, will create the file detail/pool_construct.ipp, which only defines the construct functions for the proper number of arguments. The number of arguments may be passed into the file as an m4 macro, NumberOfArguments; if not provided, it will default to 3.<br>
<br>
For each different number of arguments (1 to NumberOfArguments), a template function is generated. There are the same number of template parameters as there are arguments, and each argument's type is a reference to that (possibly cv-qualified) template argument. Each possible permutation of the cv-qualifications is also generated.<br>
<br>
Because each permutation is generated for each possible number of arguments, the included file size grows exponentially in terms of the number of constructor arguments, not linearly. For the sake of rational compile times, only use as many arguments as you need.<br>
<br>
detail/pool_construct.bat and detail/pool_construct.sh are also provided to call m4, defining NumberOfArguments to be their command-line parameter. See these files for more details. </p></td></tr>
</table></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>A pointer to an object of type T, allocated in memory from the underlying pool and constructed from arguments Arg1 to ArgN. The returned objected can be freed by a call to destroy. Otherwise the returned object will be automatically destroyed when *this is destroyed.</p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id376765-bb"></a><span class="identifier">destroy</span><span class="special">(</span><span class="identifier">element_type</span> <span class="special">*</span><span class="keyword">const</span> chunk<span class="special">)</span><span class="special">;</span></pre>
<p>Destroys an object allocated with construct.</p>
<p>Equivalent to:</p>
<p>p-&gt;~ElementType(); this-&gt;free(p);</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>p must have been previously allocated from *this via a call to construct. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id376790-bb"></a><span class="identifier">get_next_size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>The number of chunks that will be allocated next time we run out of memory. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id376803-bb"></a><span class="identifier">set_next_size</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> x<span class="special">)</span><span class="special">;</span></pre>
<p>Set a new number of chunks to allocate the next time we run out of memory.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">x</code></span></p></td>
<td><p>wanted next_size (must not be zero). </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../header/boost/pool/object_pool_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/object_pool_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,452 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template pool</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../header/boost/pool/pool_hpp.html" title="Header &lt;boost/pool/pool.hpp&gt;">
<link rel="prev" href="default_user_allocator_malloc_free.html" title="Struct default_user_allocator_malloc_free">
<link rel="next" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="default_user_allocator_malloc_free.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.pool"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template pool</span></h2>
<p>boost::pool &#8212; A fast memory allocator that guarantees proper alignment of all allocated chunks. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../header/boost/pool/pool_hpp.html" title="Header &lt;boost/pool/pool.hpp&gt;">boost/pool/pool.hpp</a>&gt;
</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> UserAllocator<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="pool.html" title="Class template pool">pool</a> <span class="special">:</span>
<span class="keyword">protected</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">simple_segregated_storage</span><span class="special">&lt;</span> <span class="identifier">UserAllocator</span><span class="special">::</span><span class="identifier">size_type</span> <span class="special">&gt;</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <span class="identifier">UserAllocator</span> <a name="boost.pool.user_allocator"></a><span class="identifier">user_allocator</span><span class="special">;</span> <span class="comment">// User allocator. </span>
<span class="keyword">typedef</span> <span class="identifier">UserAllocator</span><span class="special">::</span><span class="identifier">size_type</span> <a name="boost.pool.size_type"></a><span class="identifier">size_type</span><span class="special">;</span> <span class="comment">// An unsigned integral type that can represent the size of the largest object to be allocated. </span>
<span class="keyword">typedef</span> <span class="identifier">UserAllocator</span><span class="special">::</span><span class="identifier">difference_type</span> <a name="boost.pool.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span> <span class="comment">// A signed integral type that can represent the difference of any two pointers. </span>
<span class="comment">// <a class="link" href="pool.html#boost.poolconstruct-copy-destruct">construct/copy/destruct</a></span>
<span class="keyword">explicit</span> <a class="link" href="pool.html#id377454-bb"><span class="identifier">pool</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> <span class="special">=</span> <span class="number">32</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span>
<a class="link" href="pool.html#id377492-bb"><span class="special">~</span><span class="identifier">pool</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="pool.html#id377028-bb">private member functions</a></span>
<span class="keyword">void</span> <span class="special">*</span> <a class="link" href="pool.html#id377030-bb"><span class="identifier">malloc_need_resize</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <span class="special">*</span> <a class="link" href="pool.html#id377051-bb"><span class="identifier">ordered_malloc_need_resize</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="pool.html#id377066-bb">protected member functions</a></span>
<a class="link" href="simple_segregated_storage.html" title="Class template simple_segregated_storage">simple_segregated_storage</a><span class="special">&lt;</span> <span class="identifier">size_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <a class="link" href="pool.html#id377069-bb"><span class="identifier">store</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">const</span> <a class="link" href="simple_segregated_storage.html" title="Class template simple_segregated_storage">simple_segregated_storage</a><span class="special">&lt;</span> <span class="identifier">size_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <a class="link" href="pool.html#id377084-bb"><span class="identifier">store</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
details::PODptr<span class="special">&lt;</span> <span class="identifier">size_type</span> <span class="special">&gt;</span> <a class="link" href="pool.html#id377101-bb"><span class="identifier">find_POD</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">size_type</span> <a class="link" href="pool.html#id377126-bb"><span class="identifier">alloc_size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="comment">// <a class="link" href="pool.html#id377139-bb">protected static functions</a></span>
<span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="pool.html#id377142-bb"><span class="identifier">is_from</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">,</span> <span class="keyword">char</span> <span class="special">*</span><span class="keyword">const</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span><span class="special">&amp;</span> <a class="link" href="pool.html#id377183-bb"><span class="identifier">nextof</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="pool.html#id377201-bb">public member functions</a></span>
<span class="keyword">bool</span> <a class="link" href="pool.html#id377203-bb"><span class="identifier">release_memory</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">bool</span> <a class="link" href="pool.html#id377216-bb"><span class="identifier">purge_memory</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="identifier">size_type</span> <a class="link" href="pool.html#id377232-bb"><span class="identifier">get_next_size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="pool.html#id377246-bb"><span class="identifier">set_next_size</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="identifier">size_type</span> <a class="link" href="pool.html#id377264-bb"><span class="identifier">get_max_size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="pool.html#id377277-bb"><span class="identifier">set_max_size</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="identifier">size_type</span> <a class="link" href="pool.html#id377291-bb"><span class="identifier">get_requested_size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">void</span> <span class="special">*</span> <a class="link" href="pool.html#id377304-bb"><span class="identifier">malloc</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <span class="special">*</span> <a class="link" href="pool.html#id377318-bb"><span class="identifier">ordered_malloc</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <span class="special">*</span> <a class="link" href="pool.html#id377331-bb"><span class="identifier">ordered_malloc</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="pool.html#id377351-bb"><span class="identifier">free</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="pool.html#id377375-bb"><span class="identifier">ordered_free</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="pool.html#id377392-bb"><span class="identifier">free</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="pool.html#id377415-bb"><span class="identifier">ordered_free</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">bool</span> <a class="link" href="pool.html#id377436-bb"><span class="identifier">is_from</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id929240"></a><h2>Description</h2>
<p>Whenever an object of type pool needs memory from the system, it will request it from its UserAllocator template parameter. The amount requested is determined using a doubling algorithm; that is, each time more system memory is allocated, the amount of system memory requested is doubled.</p>
<p>Users may control the doubling algorithm by using the following extensions:</p>
<p>Users may pass an additional constructor parameter to pool. This parameter is of type size_type, and is the number of chunks to request from the system the first time that object needs to allocate system memory. The default is 32. This parameter may not be 0.</p>
<p>Users may also pass an optional third parameter to pool's constructor. This parameter is of type size_type, and sets a maximum size for allocated chunks. When this parameter takes the default value of 0, then there is no upper limit on chunk size.</p>
<p>Finally, if the doubling algorithm results in no memory being allocated, the pool will backtrack just once, halving the chunk size and trying again.</p>
<p><span class="bold"><strong>UserAllocator type</strong></span> - the method that the Pool will use to allocate memory from the system.</p>
<p>There are essentially two ways to use class pool: the client can call malloc() and free() to allocate and free single chunks of memory, this is the most efficient way to use a pool, but does not allow for the efficient allocation of arrays of chunks. Alternatively, the client may call ordered_malloc() and ordered_free(), in which case the free list is maintained in an ordered state, and efficient allocation of arrays of chunks are possible. However, this latter option can suffer from poor performance when large numbers of allocations are performed. </p>
<div class="refsect2">
<a name="id929264"></a><h3>
<a name="boost.poolconstruct-copy-destruct"></a><code class="computeroutput">pool</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="id377454-bb"></a><span class="identifier">pool</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> nrequested_size<span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">size_type</span> nnext_size <span class="special">=</span> <span class="number">32</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> nmax_size <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span></pre>
<p>Constructs a new empty Pool that can be used to allocate chunks of size RequestedSize.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">nmax_size</code></span></p></td>
<td><p>is the maximum number of chunks to allocate in one block. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">nnext_size</code></span></p></td>
<td><p>parameter is of type size_type, is the number of chunks to request from the system the first time that object needs to allocate system memory. The default is 32. This parameter may not be 0. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">nrequested_size</code></span></p></td>
<td><p>Requested chunk size </p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><a name="id377492-bb"></a><span class="special">~</span><span class="identifier">pool</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Destructs the Pool, freeing its list of memory blocks. </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id929433"></a><h3>
<a name="id377028-bb"></a><code class="computeroutput">pool</code> private member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <span class="special">*</span> <a name="id377030-bb"></a><span class="identifier">malloc_need_resize</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>
</p>
<p>No memory in any of our storages; make a new storage, Allocates chunk in newly malloc aftert resize.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>0 if out-of-memory. Called if malloc/ordered_malloc needs to resize the free list. </p></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>pointer to chunk. </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <span class="special">*</span> <a name="id377051-bb"></a><span class="identifier">ordered_malloc_need_resize</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Called if malloc needs to resize the free list. <p>No memory in any of our storages; make a new storage,
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>pointer to new chunk. </p></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id929549"></a><h3>
<a name="id377066-bb"></a><code class="computeroutput">pool</code> protected member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a class="link" href="simple_segregated_storage.html" title="Class template simple_segregated_storage">simple_segregated_storage</a><span class="special">&lt;</span> <span class="identifier">size_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <a name="id377069-bb"></a><span class="identifier">store</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>pointer to store. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">const</span> <a class="link" href="simple_segregated_storage.html" title="Class template simple_segregated_storage">simple_segregated_storage</a><span class="special">&lt;</span> <span class="identifier">size_type</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <a name="id377084-bb"></a><span class="identifier">store</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>pointer to store. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout">details::PODptr<span class="special">&lt;</span> <span class="identifier">size_type</span> <span class="special">&gt;</span> <a name="id377101-bb"></a><span class="identifier">find_POD</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> chunk<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>finds which POD in the list 'chunk' was allocated from. <p>find which PODptr storage memory that this chunk is from.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>the PODptr that holds this chunk. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id377126-bb"></a><span class="identifier">alloc_size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Calculated size of the memory chunks that will be allocated by this Pool.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>allocated size. </p></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id929807"></a><h3>
<a name="id377139-bb"></a><code class="computeroutput">pool</code> protected static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="id377142-bb"></a><span class="identifier">is_from</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> chunk<span class="special">,</span> <span class="keyword">char</span> <span class="special">*</span><span class="keyword">const</span> i<span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">size_type</span> sizeof_i<span class="special">)</span><span class="special">;</span></pre>
<p>
Returns false if chunk was allocated from some other pool, or may be returned as the result of a future allocation from some other pool. Otherwise, the return value is meaningless.</p>
<p>Note that this function may not be used to reliably test random pointer values. </p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">chunk</code></span></p></td>
<td><p>chunk to check if is from this pool. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">i</code></span></p></td>
<td><p>memory chunk at i with element sizeof_i. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">sizeof_i</code></span></p></td>
<td><p>element size (size of the chunk area of that block, not the total size of that block). </p></td>
</tr>
</tbody>
</table></div></td>
</tr>
<tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>true if chunk was allocated or may be returned. as the result of a future allocation.</p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span><span class="special">&amp;</span> <a name="id377183-bb"></a><span class="identifier">nextof</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> ptr<span class="special">)</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Pointer dereferenced. (Provided and used for the sake of code readability :) </p></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id930018"></a><h3>
<a name="id377201-bb"></a><code class="computeroutput">pool</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="id377203-bb"></a><span class="identifier">release_memory</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>pool must be ordered. Frees every memory block that doesn't have any allocated chunks.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>true if at least one memory block was freed. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="id377216-bb"></a><span class="identifier">purge_memory</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>pool must be ordered. Frees every memory block.</p>
<p>This function invalidates any pointers previously returned by allocation functions of t.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>true if at least one memory block was freed. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id377232-bb"></a><span class="identifier">get_next_size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be 0.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>next_size; </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id377246-bb"></a><span class="identifier">set_next_size</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> nnext_size<span class="special">)</span><span class="special">;</span></pre>
<p>Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>nnext_size. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id377264-bb"></a><span class="identifier">get_max_size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>max_size. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id377277-bb"></a><span class="identifier">set_max_size</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> nmax_size<span class="special">)</span><span class="special">;</span></pre>
<p>Set max_size. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="id377291-bb"></a><span class="identifier">get_requested_size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>the requested size passed into the constructor. (This value will not change during the lifetime of a Pool object). </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <span class="special">*</span> <a name="id377304-bb"></a><span class="identifier">malloc</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Allocates a chunk of memory. Searches in the list of memory blocks for a block that has a free chunk, and returns that free chunk if found. Otherwise, creates a new memory block, adds its free list to pool's free list,
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>a free chunk from that block. If a new memory block cannot be allocated, returns 0. Amortized O(1). </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <span class="special">*</span> <a name="id377318-bb"></a><span class="identifier">ordered_malloc</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Same as malloc, only merges the free lists, to preserve order. Amortized O(1).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>a free chunk from that block. If a new memory block cannot be allocated, returns 0. Amortized O(1). </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <span class="special">*</span> <a name="id377331-bb"></a><span class="identifier">ordered_malloc</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
<p>Gets address of a chunk n, allocating new memory if not already available.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td>
<p>Address of chunk n if allocated ok. </p>
<p>0 if not enough memory for n chunks. </p>
</td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id377351-bb"></a><span class="identifier">free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> chunk<span class="special">)</span><span class="special">;</span></pre>
<p>Same as malloc, only allocates enough contiguous chunks to cover n * requested_size bytes. Amortized O(n).
</p>
<p>Deallocates a chunk of memory. Note that chunk may not be 0. O(1).</p>
<p>Chunk must have been previously returned by t.malloc() or t.ordered_malloc(). Assumes that chunk actually refers to a block of chunks spanning n * partition_sz bytes. deallocates each chunk in that block. Note that chunk may not be 0. O(n). </p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>a free chunk from that block. If a new memory block cannot be allocated, returns 0. Amortized O(1). </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id377375-bb"></a><span class="identifier">ordered_free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> chunk<span class="special">)</span><span class="special">;</span></pre>
<p>Same as above, but is order-preserving.</p>
<p>Note that chunk may not be 0. O(N) with respect to the size of the free list. chunk must have been previously returned by t.malloc() or t.ordered_malloc(). </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id377392-bb"></a><span class="identifier">free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> chunks<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
<p>Assumes that chunk actually refers to a block of chunks.</p>
<p>chunk must have been previously returned by t.ordered_malloc(n) spanning n * partition_sz bytes. Deallocates each chunk in that block. Note that chunk may not be 0. O(n). </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id377415-bb"></a><span class="identifier">ordered_free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> chunks<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
<p>Assumes that chunk actually refers to a block of chunks spanning n * partition_sz bytes; deallocates each chunk in that block.</p>
<p>Note that chunk may not be 0. Order-preserving. O(N + n) where N is the size of the free list. chunk must have been previously returned by t.malloc() or t.ordered_malloc(). </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="id377436-bb"></a><span class="identifier">is_from</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> chunk<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Returns true if chunk was allocated from u or may be returned as the result of a future allocation from u. Returns false if chunk was allocated from some other pool or may be returned as the result of a future allocation from some other pool. Otherwise, the return value is meaningless. Note that this function may not be used to reliably test random pointer values. </p></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="default_user_allocator_malloc_free.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,197 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template pool_allocator</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">
<link rel="prev" href="pool_allocator_tag.html" title="Struct pool_allocator_tag">
<link rel="next" href="pool_allocator/rebind.html" title="Struct template rebind">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="pool_allocator_tag.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pool_allocator/rebind.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.pool_allocator"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template pool_allocator</span></h2>
<p>boost::pool_allocator &#8212; A C++ Standard Library conforming allocator, based on an underlying pool. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">boost/pool/pool_alloc.hpp</a>&gt;
</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> UserAllocator<span class="special">,</span> <span class="keyword">typename</span> Mutex<span class="special">,</span>
<span class="keyword">unsigned</span> NextSize<span class="special">,</span> <span class="keyword">unsigned</span> MaxSize<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <span class="identifier">T</span> <a name="boost.pool_allocator.value_type"></a><span class="identifier">value_type</span><span class="special">;</span> <span class="comment">// value_type of template parameter T. </span>
<span class="keyword">typedef</span> <span class="identifier">UserAllocator</span> <a name="boost.pool_allocator.user_allocator"></a><span class="identifier">user_allocator</span><span class="special">;</span> <span class="comment">// allocator that defines the method that the underlying Pool will use to allocate memory from the system. </span>
<span class="keyword">typedef</span> <span class="identifier">Mutex</span> <a name="boost.pool_allocator.mutex"></a><span class="identifier">mutex</span><span class="special">;</span> <span class="comment">// typedef mutex publishes the value of the template parameter Mutex. </span>
<span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="special">*</span> <a name="boost.pool_allocator.pointer"></a><span class="identifier">pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">*</span> <a name="boost.pool_allocator.const_pointer"></a><span class="identifier">const_pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="special">&amp;</span> <a name="boost.pool_allocator.reference"></a><span class="identifier">reference</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">&amp;</span> <a name="boost.pool_allocator.const_reference"></a><span class="identifier">const_reference</span><span class="special">;</span>
<span class="keyword">typedef</span> <a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">size_type</span> <a name="boost.pool_allocator.size_type"></a><span class="identifier">size_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">difference_type</span> <a name="boost.pool_allocator.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span>
<span class="comment">// member classes/structs/unions</span>
<span class="comment">// Nested class rebind allows for transformation from pool_allocator&lt;T&gt; to
// pool_allocator&lt;U&gt;.</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="pool_allocator/rebind.html" title="Struct template rebind">rebind</a> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span> <span class="special">&gt;</span> <a class="link" href="pool_allocator/rebind.html#boost.pool_allocator.rebind.other"><span class="identifier">other</span></a><span class="special">;</span>
<span class="special">}</span><span class="special">;</span>
<span class="comment">// <a class="link" href="pool_allocator.html#boost.pool_allocatorconstruct-copy-destruct">construct/copy/destruct</a></span>
<a class="link" href="pool_allocator.html#id377842-bb"><span class="identifier">pool_allocator</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span>
<a class="link" href="pool_allocator.html#id377861-bb"><span class="identifier">pool_allocator</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="pool_allocator.html#id377811-bb">public member functions</a></span>
<span class="keyword">bool</span> <a class="link" href="pool_allocator.html#id377813-bb"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">bool</span> <a class="link" href="pool_allocator.html#id377828-bb"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="comment">// <a class="link" href="pool_allocator.html#id377895-bb">public static functions</a></span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="pool_allocator.html#id377897-bb"><span class="identifier">address</span></a><span class="special">(</span><span class="identifier">reference</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">const_pointer</span> <a class="link" href="pool_allocator.html#id377908-bb"><span class="identifier">address</span></a><span class="special">(</span><span class="identifier">const_reference</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">size_type</span> <a class="link" href="pool_allocator.html#id377919-bb"><span class="identifier">max_size</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="pool_allocator.html#id377925-bb"><span class="identifier">construct</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="pool_allocator.html#id377940-bb"><span class="identifier">destroy</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="pool_allocator.html#id377951-bb"><span class="identifier">allocate</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <a class="link" href="pool_allocator.html#id377962-bb"><span class="identifier">allocate</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="pool_allocator.html#id377987-bb"><span class="identifier">deallocate</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// public data members</span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="identifier">next_size</span><span class="special">;</span> <span class="comment">// next_size publishes the values of the template parameter NextSize. </span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id933084"></a><h2>Description</h2>
<p>Template parameters for <a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a> are defined as follows:</p>
<p><span class="bold"><strong>T</strong></span> Type of object to allocate/deallocate.</p>
<p><span class="bold"><strong>UserAllocator</strong></span>. Defines the method that the underlying Pool will use to allocate memory from the system. See <a href="../boost_pool/pool/pooling.html#boost_pool.pool.pooling.user_allocator" target="_top">User Allocators</a> for details.</p>
<p><span class="bold"><strong>Mutex</strong></span> Allows the user to determine the type of synchronization to be used on the underlying <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a>.</p>
<p><span class="bold"><strong>NextSize</strong></span> The value of this parameter is passed to the underlying <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a> when it is created.</p>
<p><span class="bold"><strong>MaxSize</strong></span> Limit on the maximum size used.</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>The underlying <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a> used by the this allocator constructs a pool instance that <span class="bold"><strong>is never freed</strong></span>. This means that memory allocated by the allocator can be still used after main() has completed, but may mean that some memory checking programs will complain about leaks. </p></td></tr>
</table></div>
<p>
</p>
<div class="refsect2">
<a name="id933157"></a><h3>
<a name="boost.pool_allocatorconstruct-copy-destruct"></a><code class="computeroutput">pool_allocator</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="id377842-bb"></a><span class="identifier">pool_allocator</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Results in default construction of the underlying <code class="computeroutput"><a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a></code> IFF an instance of this allocator is constructed during global initialization ( required to ensure construction of <code class="computeroutput"><a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a></code> IFF an instance of this allocator is constructed during global initialization. See ticket #2359 for a complete explanation at <a href="http://svn.boost.org/trac/boost/ticket/2359" target="_top">http://svn.boost.org/trac/boost/ticket/2359</a>) .</p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span>
<a name="id377861-bb"></a><span class="identifier">pool_allocator</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre>
<p>Results in the default construction of the underlying <code class="computeroutput"><a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a></code>, this is required to ensure construction of <code class="computeroutput"><a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a></code> IFF an instance of this allocator is constructed during global initialization. See ticket #2359 for a complete explanation at <a href="http://svn.boost.org/trac/boost/ticket/2359" target="_top">http://svn.boost.org/trac/boost/ticket/2359</a> .</p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id934733"></a><h3>
<a name="id377811-bb"></a><code class="computeroutput">pool_allocator</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="keyword">bool</span> <a name="id377813-bb"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">bool</span> <a name="id377828-bb"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="id934845"></a><h3>
<a name="id377895-bb"></a><code class="computeroutput">pool_allocator</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="id377897-bb"></a><span class="identifier">address</span><span class="special">(</span><span class="identifier">reference</span> r<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">const_pointer</span> <a name="id377908-bb"></a><span class="identifier">address</span><span class="special">(</span><span class="identifier">const_reference</span> s<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">size_type</span> <a name="id377919-bb"></a><span class="identifier">max_size</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="id377925-bb"></a><span class="identifier">construct</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span> ptr<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">&amp;</span> t<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="id377940-bb"></a><span class="identifier">destroy</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span> ptr<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="id377951-bb"></a><span class="identifier">allocate</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pointer</span> <a name="id377962-bb"></a><span class="identifier">allocate</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">,</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> const<span class="special">)</span><span class="special">;</span></pre>
<p>allocate n bytes</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">n</code></span></p></td>
<td><p>bytes to allocate. </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="id377987-bb"></a><span class="identifier">deallocate</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span> ptr<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
<p>Deallocate n bytes from ptr
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">n</code></span></p></td>
<td><p>number of bytes to deallocate. </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">ptr</code></span></p></td>
<td><p>location to deallocate from. </p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id935438"></a><h3>Specializations</h3>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><a class="link" href="pool_allocator_void__UserAllocator__M_id378014.html" title="Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;">Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</a></p></li></ul></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="pool_allocator_tag.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pool_allocator/rebind.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,61 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct template rebind</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../pool_allocator.html#id933084" title="Description">
<link rel="prev" href="../pool_allocator.html" title="Class template pool_allocator">
<link rel="next" href="../pool_allocator_void__UserAllocator__M_id378014.html" title="Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../pool_allocator.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool_allocator.html#id933084"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../pool_allocator_void__UserAllocator__M_id378014.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.pool_allocator.rebind"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template rebind</span></h2>
<p>boost::pool_allocator::rebind &#8212; Nested class rebind allows for transformation from pool_allocator&lt;T&gt; to pool_allocator&lt;U&gt;. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">boost/pool/pool_alloc.hpp</a>&gt;
</span>
<span class="comment">// Nested class rebind allows for transformation from pool_allocator&lt;T&gt; to
// pool_allocator&lt;U&gt;.</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="rebind.html" title="Struct template rebind">rebind</a> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <a class="link" href="../pool_allocator.html" title="Class template pool_allocator">pool_allocator</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span> <span class="special">&gt;</span> <a name="boost.pool_allocator.rebind.other"></a><span class="identifier">other</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id935432"></a><h2>Description</h2>
<p>Nested class rebind allows for transformation from pool_allocator&lt;T&gt; to pool_allocator&lt;U&gt; via the member typedef other. </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../pool_allocator.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool_allocator.html#id933084"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../pool_allocator_void__UserAllocator__M_id378014.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,55 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct pool_allocator_tag</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">
<link rel="prev" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">
<link rel="next" href="pool_allocator.html" title="Class template pool_allocator">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pool_allocator.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.pool_allocator_tag"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct pool_allocator_tag</span></h2>
<p>boost::pool_allocator_tag</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">boost/pool/pool_alloc.hpp</a>&gt;
</span>
<span class="keyword">struct</span> <a class="link" href="pool_allocator_tag.html" title="Struct pool_allocator_tag">pool_allocator_tag</a> <span class="special">{</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id931985"></a><h2>Description</h2>
<p>Simple tag type used by <a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a> as an argument to the underlying <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a>. </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pool_allocator.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,71 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">
<link rel="prev" href="pool_allocator/rebind.html" title="Struct template rebind">
<link rel="next" href="pool_allocator_void__UserAllocator__M_id378014/rebind.html" title="Struct template rebind">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="pool_allocator/rebind.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pool_allocator_void__UserAllocator__M_id378014/rebind.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.pool_allocator_void,_UserAllocator,_M_id378014"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></h2>
<p>boost::pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt; &#8212; Specialization of pool_allocator&lt;void&gt;. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">boost/pool/pool_alloc.hpp</a>&gt;
</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> UserAllocator<span class="special">,</span> <span class="keyword">typename</span> Mutex<span class="special">,</span> <span class="keyword">unsigned</span> NextSize<span class="special">,</span>
<span class="keyword">unsigned</span> MaxSize<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="pool_allocator_void__UserAllocator__M_id378014.html" title="Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;">pool_allocator</a><span class="special">&lt;</span><span class="keyword">void</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span><span class="special">&gt;</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <span class="keyword">void</span> <span class="special">*</span> <a name="boost.pool_allocator_void,_UserAllocator,_M_id378014.pointer"></a><span class="identifier">pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <a name="boost.pool_allocator_void,_UserAllocator,_M_id378014.const_pointer"></a><span class="identifier">const_pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">void</span> <a name="boost.pool_allocator_void,_UserAllocator,_M_id378014.value_type"></a><span class="identifier">value_type</span><span class="special">;</span>
<span class="comment">// member classes/structs/unions</span>
<span class="comment">// Nested class rebind allows for transformation from pool_allocator&lt;T&gt; to
// pool_allocator&lt;U&gt;.</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="pool_allocator_void__UserAllocator__M_id378014/rebind.html" title="Struct template rebind">rebind</a> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span> <span class="special">&gt;</span> <a class="link" href="pool_allocator_void__UserAllocator__M_id378014/rebind.html#boost.pool_allocator_void,_UserAllocator,_M_id378014.rebind.other"><span class="identifier">other</span></a><span class="special">;</span>
<span class="special">}</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id935804"></a><h2>Description</h2>
<p>Specialization of <a class="link" href="pool_allocator.html" title="Class template pool_allocator">pool_allocator</a> for type void: required by the standard to make this a conforming allocator type. </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="pool_allocator/rebind.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/pool_alloc_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pool_allocator_void__UserAllocator__M_id378014/rebind.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,61 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct template rebind</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../pool_allocator_void__UserAllocator__M_id378014.html#id935804" title="Description">
<link rel="prev" href="../pool_allocator_void__UserAllocator__M_id378014.html" title="Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;">
<link rel="next" href="../fast_pool_allocator_tag.html" title="Struct fast_pool_allocator_tag">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../pool_allocator_void__UserAllocator__M_id378014.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool_allocator_void__UserAllocator__M_id378014.html#id935804"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../fast_pool_allocator_tag.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.pool_allocator_void,_UserAllocator,_M_id378014.rebind"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template rebind</span></h2>
<p>boost::pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;::rebind &#8212; Nested class rebind allows for transformation from pool_allocator&lt;T&gt; to pool_allocator&lt;U&gt;. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">boost/pool/pool_alloc.hpp</a>&gt;
</span>
<span class="comment">// Nested class rebind allows for transformation from pool_allocator&lt;T&gt; to
// pool_allocator&lt;U&gt;.</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span>
<span class="keyword">struct</span> <a class="link" href="rebind.html" title="Struct template rebind">rebind</a> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <a class="link" href="../pool_allocator.html" title="Class template pool_allocator">pool_allocator</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span> <span class="special">&gt;</span> <a name="boost.pool_allocator_void,_UserAllocator,_M_id378014.rebind.other"></a><span class="identifier">other</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id935962"></a><h2>Description</h2>
<p>Nested class rebind allows for transformation from pool_allocator&lt;T&gt; to pool_allocator&lt;U&gt; via the member typedef other. </p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../pool_allocator_void__UserAllocator__M_id378014.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool_allocator_void__UserAllocator__M_id378014.html#id935804"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../fast_pool_allocator_tag.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,340 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template simple_segregated_storage</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../header/boost/pool/simple_segregated_storage_hpp.html" title="Header &lt;boost/pool/simple_segregated_storage.hpp&gt;">
<link rel="prev" href="../header/boost/pool/simple_segregated_storage_hpp.html" title="Header &lt;boost/pool/simple_segregated_storage.hpp&gt;">
<link rel="next" href="../BOOST_POOL_VALIDATE_INTERNALS.html" title="Macro BOOST_POOL_VALIDATE_INTERNALS">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../header/boost/pool/simple_segregated_storage_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/simple_segregated_storage_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../BOOST_POOL_VALIDATE_INTERNALS.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.simple_segregated_storage"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template simple_segregated_storage</span></h2>
<p>boost::simple_segregated_storage &#8212; Simple Segregated Storage is the simplest, and probably the fastest, memory allocation/deallocation algorithm. It is responsible for partitioning a memory block into fixed-size chunks: where the block comes from is determined by the client of the class. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../header/boost/pool/simple_segregated_storage_hpp.html" title="Header &lt;boost/pool/simple_segregated_storage.hpp&gt;">boost/pool/simple_segregated_storage.hpp</a>&gt;
</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SizeType<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="simple_segregated_storage.html" title="Class template simple_segregated_storage">simple_segregated_storage</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <span class="identifier">SizeType</span> <a name="boost.simple_segregated_storage.size_type"></a><span class="identifier">size_type</span><span class="special">;</span>
<span class="comment">// <a class="link" href="simple_segregated_storage.html#boost.simple_segregated_storageconstruct-copy-destruct">construct/copy/destruct</a></span>
<a class="link" href="simple_segregated_storage.html#id378665-bb"><span class="identifier">simple_segregated_storage</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="simple_segregated_storage.html" title="Class template simple_segregated_storage">simple_segregated_storage</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<a class="link" href="simple_segregated_storage.html#id378983-bb"><span class="identifier">simple_segregated_storage</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
simple_segregated_storage&amp; <a class="link" href="simple_segregated_storage.html#id378675-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="keyword">const</span> <a class="link" href="simple_segregated_storage.html" title="Class template simple_segregated_storage">simple_segregated_storage</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="simple_segregated_storage.html#id378684-bb">private static functions</a></span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span> <a class="link" href="simple_segregated_storage.html#id378687-bb"><span class="identifier">try_malloc_n</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="special">&amp;</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="simple_segregated_storage.html#id378718-bb">protected member functions</a></span>
<span class="keyword">void</span> <span class="special">*</span> <a class="link" href="simple_segregated_storage.html#id378720-bb"><span class="identifier">find_prev</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="simple_segregated_storage.html#id378743-bb">protected static functions</a></span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span><span class="special">&amp;</span> <a class="link" href="simple_segregated_storage.html#id378746-bb"><span class="identifier">nextof</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="simple_segregated_storage.html#id378766-bb">public member functions</a></span>
<span class="keyword">void</span> <a class="link" href="simple_segregated_storage.html#id378768-bb"><span class="identifier">add_block</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="simple_segregated_storage.html#id378800-bb"><span class="identifier">add_ordered_block</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">bool</span> <a class="link" href="simple_segregated_storage.html#id378824-bb"><span class="identifier">empty</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">void</span> <span class="special">*</span> <a class="link" href="simple_segregated_storage.html#id378842-bb"><span class="identifier">malloc</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="simple_segregated_storage.html#id378855-bb"><span class="identifier">free</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="simple_segregated_storage.html#id378876-bb"><span class="identifier">ordered_free</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <span class="special">*</span> <a class="link" href="simple_segregated_storage.html#id378898-bb"><span class="identifier">malloc_n</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="simple_segregated_storage.html#id378917-bb"><span class="identifier">free_n</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">void</span> <a class="link" href="simple_segregated_storage.html#id378953-bb"><span class="identifier">ordered_free_n</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="simple_segregated_storage.html#id378992-bb">public static functions</a></span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span> <a class="link" href="simple_segregated_storage.html#id378994-bb"><span class="identifier">segregate</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id941276"></a><h2>Description</h2>
<p>Template class <a class="link" href="simple_segregated_storage.html" title="Class template simple_segregated_storage">simple_segregated_storage</a> controls access to a free list of memory chunks. Please note that this is a very simple class, with preconditions on almost all its functions. It is intended to be the fastest and smallest possible quick memory allocator - e.g., something to use in embedded systems. This class delegates many difficult preconditions to the user (i.e., alignment issues).</p>
<p>An object of type simple_segregated_storage&lt;SizeType&gt; is empty if its free list is empty. If it is not empty, then it is ordered if its free list is ordered. A free list is ordered if repeated calls to <code class="computeroutput">malloc()</code> will result in a constantly-increasing sequence of values, as determined by <code class="computeroutput">std::less&lt;void *&gt;</code>. A member function is <span class="emphasis"><em>order-preserving</em></span> if the free list maintains its order orientation (that is, an ordered free list is still ordered after the member function call). </p>
<div class="refsect2">
<a name="id941302"></a><h3>
<a name="boost.simple_segregated_storageconstruct-copy-destruct"></a><code class="computeroutput">simple_segregated_storage</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><a name="id378665-bb"></a><span class="identifier">simple_segregated_storage</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="simple_segregated_storage.html" title="Class template simple_segregated_storage">simple_segregated_storage</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><a name="id378983-bb"></a><span class="identifier">simple_segregated_storage</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Construct empty storage area.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>empty() </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem"><pre class="literallayout">simple_segregated_storage&amp; <a name="id378675-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="keyword">const</span> <a class="link" href="simple_segregated_storage.html" title="Class template simple_segregated_storage">simple_segregated_storage</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="id941430"></a><h3>
<a name="id378684-bb"></a><code class="computeroutput">simple_segregated_storage</code> private static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span>
<a name="id378687-bb"></a><span class="identifier">try_malloc_n</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="special">&amp;</span> start<span class="special">,</span> <span class="identifier">size_type</span> n<span class="special">,</span> <span class="identifier">size_type</span> partition_size<span class="special">)</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>(n &gt; 0), (start != 0), (nextof(start) != 0) </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>(start != 0) The function attempts to find n contiguous chunks of size partition_size in the free list, starting at start. If it succeds, it returns the last chunk in that contiguous sequence, so that the sequence is known by [start, {retval}] If it fails, it does do either because it's at the end of the free list or hits a non-contiguous chunk. In either case, it will return 0, and set start to the last considered chunk. You are at the end of the free list if nextof(start) == 0. Otherwise, start points to the last chunk in the contiguous sequence, and nextof(start) points to the first chunk in the next contiguous sequence (assuming an ordered free list). </p></td>
</tr>
</tbody>
</table></div>
</li></ol></div>
</div>
<div class="refsect2">
<a name="id941533"></a><h3>
<a name="id378718-bb"></a><code class="computeroutput">simple_segregated_storage</code> protected member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <span class="special">*</span> <a name="id378720-bb"></a><span class="identifier">find_prev</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> ptr<span class="special">)</span><span class="special">;</span></pre>
<p>Traverses the free list referred to by "first", and returns the iterator previous to where "ptr" would go if it was in the free list. Returns 0 if "ptr" would go at the beginning of the free list (i.e., before "first"). </p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>Note that this function finds the location previous to where ptr would go if it was in the free list. It does not find the entry in the free list before ptr (unless ptr is already in the free list). Specifically, find_prev(0) will return 0, not the last entry in the free list. </p></td></tr>
</table></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>location previous to where ptr would go if it was in the free list. </p></td>
</tr></tbody>
</table></div>
</li></ol></div>
</div>
<div class="refsect2">
<a name="id941606"></a><h3>
<a name="id378743-bb"></a><code class="computeroutput">simple_segregated_storage</code> protected static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span><span class="special">&amp;</span> <a name="id378746-bb"></a><span class="identifier">nextof</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> ptr<span class="special">)</span><span class="special">;</span></pre>
<p>The return value is just *ptr cast to the appropriate type. ptr must not be 0. (For the sake of code readability :)</p>
<p>As an example, let us assume that we want to truncate the free list after the first chunk. That is, we want to set *first to 0; this will result in a free list with only one entry. The normal way to do this is to first cast first to a pointer to a pointer to void, and then dereference and assign (*static_cast&lt;void **&gt;(first) = 0;). This can be done more easily through the use of this convenience function (nextof(first) = 0;).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>dereferenced pointer. </p></td>
</tr></tbody>
</table></div>
</li></ol></div>
</div>
<div class="refsect2">
<a name="id941689"></a><h3>
<a name="id378766-bb"></a><code class="computeroutput">simple_segregated_storage</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id378768-bb"></a><span class="identifier">add_block</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> block<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> nsz<span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">size_type</span> npartition_sz<span class="special">)</span><span class="special">;</span></pre>
<p>Add block Segregate this block and merge its free list into the free list referred to by "first".
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>Same as segregate. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>!empty() </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id378800-bb"></a><span class="identifier">add_ordered_block</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> block<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> nsz<span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">size_type</span> npartition_sz<span class="special">)</span><span class="special">;</span></pre>
<p>add block (ordered into list) This (slower) version of add_block segregates the block and merges its free list into our free list in the proper order. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="id378824-bb"></a><span class="identifier">empty</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>true only if <a class="link" href="simple_segregated_storage.html" title="Class template simple_segregated_storage">simple_segregated_storage</a> is empty. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <span class="special">*</span> <a name="id378842-bb"></a><span class="identifier">malloc</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Create a chunk.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>!empty() Increment the "first" pointer to point to the next chunk. </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id378855-bb"></a><span class="identifier">free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> chunk<span class="special">)</span><span class="special">;</span></pre>
<p>Free a chunk.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>chunk was previously returned from a malloc() referring to the same free list. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>!empty() </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id378876-bb"></a><span class="identifier">ordered_free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> chunk<span class="special">)</span><span class="special">;</span></pre>
<p>This (slower) implementation of 'free' places the memory back in the list in its proper order.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>chunk was previously returned from a malloc() referring to the same free list </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>!empty(). </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <span class="special">*</span> <a name="id378898-bb"></a><span class="identifier">malloc_n</span><span class="special">(</span><span class="identifier">size_type</span> n<span class="special">,</span> <span class="identifier">size_type</span> partition_size<span class="special">)</span><span class="special">;</span></pre>
<p>Attempts to find a contiguous sequence of n partition_sz-sized chunks. If found, removes them all from the free list and returns a pointer to the first. If not found, returns 0. It is strongly recommended (but not required) that the free list be ordered, as this algorithm will fail to find a contiguous sequence unless it is contiguous in the free list as well. Order-preserving. O(N) with respect to the size of the free list. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id378917-bb"></a><span class="identifier">free_n</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> chunks<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">size_type</span> partition_size<span class="special">)</span><span class="special">;</span></pre>
<p>
</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>If you're allocating/deallocating n a lot, you should be using an ordered pool. </p></td></tr>
</table></div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">Requires:</span></p></td>
<td><p>chunks was previously allocated from *this with the same values for n and partition_size. </p></td>
</tr>
<tr>
<td><p><span class="term">Postconditions:</span></p></td>
<td><p>!empty() </p></td>
</tr>
</tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id378953-bb"></a><span class="identifier">ordered_free_n</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> chunks<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">,</span>
<span class="keyword">const</span> <span class="identifier">size_type</span> partition_size<span class="special">)</span><span class="special">;</span></pre>
<p>Free n chunks from order list.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td>
<p>chunks was previously allocated from *this with the same values for n and partition_size.</p>
<p>n should not be zero (n == 0 has no effect). </p>
</td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id942312"></a><h3>
<a name="id378992-bb"></a><code class="computeroutput">simple_segregated_storage</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span>
<a name="id378994-bb"></a><span class="identifier">segregate</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> block<span class="special">,</span> <span class="identifier">size_type</span> nsz<span class="special">,</span> <span class="identifier">size_type</span> npartition_sz<span class="special">,</span>
<span class="keyword">void</span> <span class="special">*</span> end <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span></pre>
<p>Segregate block into chunks.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Requires:</span></p></td>
<td>
<p>npartition_sz &gt;= sizeof(void *) </p>
<p>npartition_sz = sizeof(void *) * i, for some integer i </p>
<p>nsz &gt;= npartition_sz </p>
<p>Block is properly aligned for an array of object of size npartition_sz and array of void *. The requirements above guarantee that any pointer to a chunk (which is a pointer to an element in an array of npartition_sz) may be cast to void **. </p>
</td>
</tr></tbody>
</table></div>
</li></ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../header/boost/pool/simple_segregated_storage_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/simple_segregated_storage_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../BOOST_POOL_VALIDATE_INTERNALS.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,195 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template singleton_pool</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../header/boost/pool/singleton_pool_hpp.html" title="Header &lt;boost/pool/singleton_pool.hpp&gt;">
<link rel="prev" href="../header/boost/pool/singleton_pool_hpp.html" title="Header &lt;boost/pool/singleton_pool.hpp&gt;">
<link rel="next" href="singleton_pool/object_creator.html" title="Struct object_creator">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../header/boost/pool/singleton_pool_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/singleton_pool_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="singleton_pool/object_creator.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.singleton_pool"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template singleton_pool</span></h2>
<p>boost::singleton_pool</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../header/boost/pool/singleton_pool_hpp.html" title="Header &lt;boost/pool/singleton_pool.hpp&gt;">boost/pool/singleton_pool.hpp</a>&gt;
</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Tag<span class="special">,</span> <span class="keyword">unsigned</span> RequestedSize<span class="special">,</span> <span class="keyword">typename</span> UserAllocator<span class="special">,</span>
<span class="keyword">typename</span> Mutex<span class="special">,</span> <span class="keyword">unsigned</span> NextSize<span class="special">,</span> <span class="keyword">unsigned</span> MaxSize<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="comment">// <a class="link" href="singleton_pool.html#boost.singleton_pooltypes">types</a></span>
<span class="keyword">typedef</span> <span class="identifier">Tag</span> <a class="link" href="singleton_pool.html#boost.singleton_pool.tag"><span class="identifier">tag</span></a><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">Mutex</span> <a name="boost.singleton_pool.mutex"></a><span class="identifier">mutex</span><span class="special">;</span> <span class="comment">// The type of mutex used to synchonise access to this pool (default <code class="computeroutput">details::pool::default_mutex</code>). </span>
<span class="keyword">typedef</span> <span class="identifier">UserAllocator</span> <a name="boost.singleton_pool.user_allocator"></a><span class="identifier">user_allocator</span><span class="special">;</span> <span class="comment">// The user-allocator used by this pool, default = <code class="computeroutput"><a class="link" href="default_user_allocator_new_delete.html" title="Struct default_user_allocator_new_delete">default_user_allocator_new_delete</a></code>. </span>
<span class="keyword">typedef</span> <a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">size_type</span> <a name="boost.singleton_pool.size_type"></a><span class="identifier">size_type</span><span class="special">;</span> <span class="comment">// size_type of user allocator. </span>
<span class="keyword">typedef</span> <a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">difference_type</span> <a name="boost.singleton_pool.difference_type"></a><span class="identifier">difference_type</span><span class="special">;</span> <span class="comment">// difference_type of user allocator. </span>
<span class="comment">// member classes/structs/unions</span>
<span class="keyword">struct</span> <a class="link" href="singleton_pool/object_creator.html" title="Struct object_creator">object_creator</a> <span class="special">{</span>
<span class="comment">// <a class="link" href="singleton_pool/object_creator.html#boost.singleton_pool.object_creatorconstruct-copy-destruct">construct/copy/destruct</a></span>
<a class="link" href="singleton_pool/object_creator.html#id379229-bb"><span class="identifier">object_creator</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="singleton_pool/object_creator.html#id379221-bb">public member functions</a></span>
<span class="keyword">void</span> <a class="link" href="singleton_pool/object_creator.html#id379223-bb"><span class="identifier">do_nothing</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span>
<span class="comment">// <a class="link" href="singleton_pool.html#boost.singleton_poolconstruct-copy-destruct">construct/copy/destruct</a></span>
<a class="link" href="singleton_pool.html#id379318-bb"><span class="identifier">singleton_pool</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="singleton_pool.html#id379319-bb">public static functions</a></span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span> <a class="link" href="singleton_pool.html#id379322-bb"><span class="identifier">malloc</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span> <a class="link" href="singleton_pool.html#id379331-bb"><span class="identifier">ordered_malloc</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span> <a class="link" href="singleton_pool.html#id379342-bb"><span class="identifier">ordered_malloc</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="singleton_pool.html#id379356-bb"><span class="identifier">is_from</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="singleton_pool.html#id379376-bb"><span class="identifier">free</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="singleton_pool.html#id379391-bb"><span class="identifier">ordered_free</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="singleton_pool.html#id379406-bb"><span class="identifier">free</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="singleton_pool.html#id379426-bb"><span class="identifier">ordered_free</span></a><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="singleton_pool.html#id379446-bb"><span class="identifier">release_memory</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="singleton_pool.html#id379456-bb"><span class="identifier">purge_memory</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="singleton_pool.html#id379467-bb">private static functions</a></span>
<span class="keyword">static</span> <span class="identifier">pool_type</span> <span class="special">&amp;</span> <a class="link" href="singleton_pool.html#id379470-bb"><span class="identifier">get_pool</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// public data members</span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="identifier">requested_size</span><span class="special">;</span> <span class="comment">// The size of each chunk allocated by this pool. </span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="identifier">next_size</span><span class="special">;</span> <span class="comment">// The number of chunks to allocate on the first allocation. </span>
<span class="keyword">static</span> <a class="link" href="pool.html" title="Class template pool">pool</a><span class="special">&lt;</span> <span class="identifier">UserAllocator</span> <span class="special">&gt;</span> <span class="identifier">p</span><span class="special">;</span> <span class="comment">// For exposition only! </span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id944392"></a><h2>Description</h2>
<p>The <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a> class allows other pool interfaces for types of the same size to share the same pool. Template parameters are as follows:</p>
<p><span class="bold"><strong>Tag</strong></span> User-specified type to uniquely identify this pool: allows different unbounded sets of singleton pools to exist.</p>
<p><span class="bold"><strong>RequestedSize</strong></span> The size of each chunk returned by member function <code class="computeroutput">malloc()</code>.</p>
<p><span class="bold"><strong>UserAllocator</strong></span> User allocator, default = <a class="link" href="default_user_allocator_new_delete.html" title="Struct default_user_allocator_new_delete">default_user_allocator_new_delete</a>.</p>
<p><span class="bold"><strong>Mutex</strong></span> This class is the type of mutex to use to protect simultaneous access to the underlying Pool. Can be any Boost.Thread Mutex type or <code class="computeroutput">boost::details::pool::null_mutex</code>. It is exposed so that users may declare some singleton pools normally (i.e., with synchronization), but some singleton pools without synchronization (by specifying <code class="computeroutput">boost::details::pool::null_mutex</code>) for efficiency reasons. The member typedef <code class="computeroutput">mutex</code> exposes the value of this template parameter. The default for this parameter is boost::details::pool::default_mutex which is a synonym for either <code class="computeroutput">boost::details::pool::null_mutex</code> (when threading support is turned off in the compiler (so BOOST_HAS_THREADS is not set), or threading support has ben explicitly disabled with BOOST_DISABLE_THREADS (Boost-wide disabling of threads) or BOOST_POOL_NO_MT (this library only)) or for <code class="computeroutput">boost::mutex</code> (when threading support is enabled in the compiler).</p>
<p><span class="bold"><strong>NextSize</strong></span> The value of this parameter is passed to the underlying Pool when it is created and specifies the number of chunks to allocate in the first allocation request (defaults to 32). The member typedef <code class="computeroutput">static const value next_size</code> exposes the value of this template parameter.</p>
<p><span class="bold"><strong>MaxSize</strong></span>The value of this parameter is passed to the underlying Pool when it is created and specifies the maximum number of chunks to allocate in any single allocation request (defaults to 0).</p>
<p><span class="bold"><strong>Notes:</strong></span></p>
<p>The underlying pool <span class="emphasis"><em>p</em></span> referenced by the static functions in <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a> is actually declared in a way that is:</p>
<p>1 Thread-safe if there is only one thread running before main() begins and after main() ends -- all of the static functions of <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a> synchronize their access to p.</p>
<p>2 Guaranteed to be constructed before it is used -- thus, the simple static object in the synopsis above would actually be an incorrect implementation. The actual implementation to guarantee this is considerably more complicated.</p>
<p>3 Note too that a different underlying pool p exists for each different set of template parameters, including implementation-specific ones.</p>
<p>4 The underlying pool is constructed "as if" by:</p>
<p>pool&lt;UserAllocator&gt; p(RequestedSize, NextSize, MaxSize);</p>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>The underlying pool constructed by the singleton <span class="bold"><strong>is never freed</strong></span>. This means that memory allocated by a <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a> can be still used after main() has completed, but may mean that some memory checking programs will complain about leaks from <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a>. </p></td></tr>
</table></div>
<p>
</p>
<div class="refsect2">
<a name="id944530"></a><h3>
<a name="boost.singleton_pooltypes"></a><code class="computeroutput">singleton_pool</code>
public
types</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="identifier">Tag</span> <a name="boost.singleton_pool.tag"></a><span class="identifier">tag</span><span class="special">;</span></p>
<p>The Tag template parameter uniquely identifies this pool and allows different unbounded sets of singleton pools to exist. For example, the pool allocators use two tag classes to ensure that the two different allocator types never share the same underlying singleton pool. Tag is never actually used by <a class="link" href="singleton_pool.html" title="Class template singleton_pool">singleton_pool</a>. </p>
</li></ol></div>
</div>
<div class="refsect2">
<a name="id944574"></a><h3>
<a name="boost.singleton_poolconstruct-copy-destruct"></a><code class="computeroutput">singleton_pool</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><pre class="literallayout"><a name="id379318-bb"></a><span class="identifier">singleton_pool</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li></ol></div>
</div>
<div class="refsect2">
<a name="id944610"></a><h3>
<a name="id379319-bb"></a><code class="computeroutput">singleton_pool</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span> <a name="id379322-bb"></a><span class="identifier">malloc</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Equivalent to SingletonPool::p.malloc(); synchronized. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span> <a name="id379331-bb"></a><span class="identifier">ordered_malloc</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Equivalent to SingletonPool::p.ordered_malloc(); synchronized. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span> <a name="id379342-bb"></a><span class="identifier">ordered_malloc</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
<p>Equivalent to SingletonPool::p.ordered_malloc(n); synchronized. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="id379356-bb"></a><span class="identifier">is_from</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> ptr<span class="special">)</span><span class="special">;</span></pre>
<p>Equivalent to SingletonPool::p.is_from(chunk); synchronized.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>true if chunk is from SingletonPool::is_from(chunk) </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="id379376-bb"></a><span class="identifier">free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> ptr<span class="special">)</span><span class="special">;</span></pre>
<p>Equivalent to SingletonPool::p.free(chunk); synchronized. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="id379391-bb"></a><span class="identifier">ordered_free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> ptr<span class="special">)</span><span class="special">;</span></pre>
<p>Equivalent to SingletonPool::p.ordered_free(chunk); synchronized. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="id379406-bb"></a><span class="identifier">free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> ptr<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
<p>Equivalent to SingletonPool::p.free(chunk, n); synchronized. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="id379426-bb"></a><span class="identifier">ordered_free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span><span class="keyword">const</span> ptr<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">size_type</span> n<span class="special">)</span><span class="special">;</span></pre>
<p>Equivalent to SingletonPool::p.ordered_free(chunk, n); synchronized. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="id379446-bb"></a><span class="identifier">release_memory</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Equivalent to SingletonPool::p.release_memory(); synchronized. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="id379456-bb"></a><span class="identifier">purge_memory</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Equivalent to SingletonPool::p.purge_memory(); synchronized. </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id945106"></a><h3>
<a name="id379467-bb"></a><code class="computeroutput">singleton_pool</code> private static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">pool_type</span> <span class="special">&amp;</span> <a name="id379470-bb"></a><span class="identifier">get_pool</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li></ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../header/boost/pool/singleton_pool_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/pool/singleton_pool_hpp.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="singleton_pool/object_creator.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,72 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct object_creator</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../singleton_pool.html#id944392" title="Description">
<link rel="prev" href="../singleton_pool.html" title="Class template singleton_pool">
<link rel="next" href="../../boost_pool/appendices.html" title="Appendices">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../singleton_pool.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../singleton_pool.html#id944392"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../boost_pool/appendices.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.singleton_pool.object_creator"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct object_creator</span></h2>
<p>boost::singleton_pool::object_creator</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../header/boost/pool/singleton_pool_hpp.html" title="Header &lt;boost/pool/singleton_pool.hpp&gt;">boost/pool/singleton_pool.hpp</a>&gt;
</span>
<span class="keyword">struct</span> <a class="link" href="object_creator.html" title="Struct object_creator">object_creator</a> <span class="special">{</span>
<span class="comment">// <a class="link" href="object_creator.html#boost.singleton_pool.object_creatorconstruct-copy-destruct">construct/copy/destruct</a></span>
<a class="link" href="object_creator.html#id379229-bb"><span class="identifier">object_creator</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="comment">// <a class="link" href="object_creator.html#id379221-bb">public member functions</a></span>
<span class="keyword">void</span> <a class="link" href="object_creator.html#id379223-bb"><span class="identifier">do_nothing</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id945270"></a><h2>Description</h2>
<div class="refsect2">
<a name="id945273"></a><h3>
<a name="boost.singleton_pool.object_creatorconstruct-copy-destruct"></a><code class="computeroutput">object_creator</code>
public
construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><pre class="literallayout"><a name="id379229-bb"></a><span class="identifier">object_creator</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li></ol></div>
</div>
<div class="refsect2">
<a name="id945312"></a><h3>
<a name="id379221-bb"></a><code class="computeroutput">object_creator</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="id379223-bb"></a><span class="identifier">do_nothing</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li></ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../singleton_pool.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../singleton_pool.html#id944392"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../boost_pool/appendices.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,54 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Appendices</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../index.html" title="Boost.Pool">
<link rel="prev" href="../boost/singleton_pool/object_creator.html" title="Struct object_creator">
<link rel="next" href="appendices/history.html" title="Appendix A: History">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../boost/singleton_pool/object_creator.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="appendices/history.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_pool.appendices"></a><a class="link" href="appendices.html" title="Appendices">Appendices</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="appendices/history.html">Appendix A: History</a></span></dt>
<dt><span class="section"><a href="appendices/faq.html">Appendix B: FAQ</a></span></dt>
<dt><span class="section"><a href="appendices/acknowledgements.html">Appendix C: Acknowledgements</a></span></dt>
<dt><span class="section"><a href="appendices/tests.html">Appendix D: Tests</a></span></dt>
<dt><span class="section"><a href="appendices/tickets.html">Appendix E: Tickets</a></span></dt>
<dt><span class="section"><a href="appendices/implementations.html">Appendix F: Other
Implementations</a></span></dt>
<dt><span class="section"><a href="appendices/references.html">Appendix G: References</a></span></dt>
<dt><span class="section"><a href="appendices/todo.html">Appendix H: Future plans</a></span></dt>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../boost/singleton_pool/object_creator.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="appendices/history.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,48 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Appendix C: Acknowledgements</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../appendices.html" title="Appendices">
<link rel="prev" href="faq.html" title="Appendix B: FAQ">
<link rel="next" href="tests.html" title="Appendix D: Tests">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="faq.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tests.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.appendices.acknowledgements"></a><a class="link" href="acknowledgements.html" title="Appendix C: Acknowledgements">Appendix C: Acknowledgements</a>
</h3></div></div></div>
<p>
Many, many thanks to the Boost peers, notably Jeff Garland, Beman Dawes,
Ed Brey, Gary Powell, Peter Dimov, and Jens Maurer for providing helpful
suggestions!
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="faq.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tests.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,70 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Appendix B: FAQ</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../appendices.html" title="Appendices">
<link rel="prev" href="history.html" title="Appendix A: History">
<link rel="next" href="acknowledgements.html" title="Appendix C: Acknowledgements">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="history.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.appendices.faq"></a><a class="link" href="faq.html" title="Appendix B: FAQ">Appendix B: FAQ</a>
</h3></div></div></div>
<h6>
<a name="boost_pool.appendices.faq.h0"></a>
<span><a name="boost_pool.appendices.faq.why_should_i_use_pool_"></a></span><a class="link" href="faq.html#boost_pool.appendices.faq.why_should_i_use_pool_">Why
should I use Pool?</a>
</h6>
<p>
Using Pools gives you more control over how memory is used in your program.
For example, you could have a situation where you want to allocate a bunch
of small objects at one point, and then reach a point in your program where
none of them are needed any more. Using pool interfaces, you can choose to
run their destructors or just drop them off into oblivion; the pool interface
will guarantee that there are no system memory leaks.
</p>
<h6>
<a name="boost_pool.appendices.faq.h1"></a>
<span><a name="boost_pool.appendices.faq.when_should_i_use_pool_"></a></span><a class="link" href="faq.html#boost_pool.appendices.faq.when_should_i_use_pool_">When
should I use Pool?</a>
</h6>
<p>
Pools are generally used when there is a lot of allocation and deallocation
of small objects. Another common usage is the situation above, where many
objects may be dropped out of memory.
</p>
<p>
In general, use Pools when you need a more efficient way to do unusual memory
control.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="history.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="acknowledgements.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,86 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Appendix A: History</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../appendices.html" title="Appendices">
<link rel="prev" href="../appendices.html" title="Appendices">
<link rel="next" href="faq.html" title="Appendix B: FAQ">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../appendices.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="faq.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.appendices.history"></a><a class="link" href="history.html" title="Appendix A: History">Appendix A: History</a>
</h3></div></div></div>
<h5>
<a name="boost_pool.appendices.history.h0"></a>
<span><a name="boost_pool.appendices.history.version_2_0_0__january_11__2011"></a></span><a class="link" href="history.html#boost_pool.appendices.history.version_2_0_0__january_11__2011">Version
2.0.0, January 11, 2011</a>
</h5>
<p>
<span class="emphasis"><em>Documentation and testing revision</em></span>
</p>
<p>
<span class="bold"><strong>Features:</strong></span>
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Fix issues <a href="https://svn.boost.org/trac/boost/ticket/1252" target="_top">1252</a>,
<a href="https://svn.boost.org/trac/boost/ticket/4960" target="_top">4960</a>,
<a href="https://svn.boost.org/trac/boost/ticket/5526" target="_top">5526</a>,
<a href="https://svn.boost.org/trac/boost/ticket/5700" target="_top">5700</a>,
<a href="https://svn.boost.org/trac/boost/ticket/2696" target="_top">2696</a>.
</li>
<li class="listitem">
Documentation converted and rewritten and revised by Paul A. Bristow
using Quickbook, Doxygen, for html and pdf, based on Stephen Cleary's
html version, Revised 05 December, 2006.
</li>
</ul></div>
<p>
This used Opera 11.0, and <code class="computeroutput"><span class="identifier">html_to_quickbook</span><span class="special">.</span><span class="identifier">css</span></code> as
a special display format. On the Opera full taskbar (chose <span class="emphasis"><em>enable
full taskbar</em></span>) View, Style, Manage modes, Display.
</p>
<p>
Choose <span class="emphasis"><em>add <code class="computeroutput"><span class="special">\</span><span class="identifier">boost</span><span class="special">-</span><span class="identifier">sandbox</span><span class="special">\</span><span class="identifier">boost_docs</span><span class="special">\</span><span class="identifier">trunk</span><span class="special">\</span><span class="identifier">doc</span><span class="special">\</span><span class="identifier">style</span><span class="special">\</span><span class="identifier">html</span><span class="special">\</span><span class="identifier">conversion</span><span class="special">\</span><span class="identifier">html_to_quickbook</span><span class="special">.</span><span class="identifier">css</span></code></em></span>
to My Style Sheet. Html pages are now displayed as Quickbook and can be copied
and pasted into quickbook files using your favored text editor for Quickbook.
</p>
<h5>
<a name="boost_pool.appendices.history.h1"></a>
<span><a name="boost_pool.appendices.history.version_1_0_0__january_1__2000"></a></span><a class="link" href="history.html#boost_pool.appendices.history.version_1_0_0__january_1__2000">Version
1.0.0, January 1, 2000</a>
</h5>
<p>
<span class="emphasis"><em>First release</em></span>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../appendices.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="faq.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,133 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Appendix F: Other Implementations</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../appendices.html" title="Appendices">
<link rel="prev" href="tickets.html" title="Appendix E: Tickets">
<link rel="next" href="references.html" title="Appendix G: References">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tickets.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.appendices.implementations"></a><a class="link" href="implementations.html" title="Appendix F: Other Implementations">Appendix F: Other
Implementations</a>
</h3></div></div></div>
<p>
Pool allocators are found in many programming languages, and in many variations.
The beginnings of many implementations may be found in common programming
literature; some of these are given below. Note that none of these are complete
implementations of a Pool; most of these leave some aspects of a Pool as
a user exercise. However, in each case, even though some aspects are missing,
these examples use the same underlying concept of a Simple Segregated Storage
described in this document.
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<span class="emphasis"><em>The C++ Programming Language</em></span>, 3rd ed., by Bjarne
Stroustrup, Section 19.4.2. Missing aspects:
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Not portable.
</li>
<li class="listitem">
Cannot handle allocations of arbitrary numbers of objects (this
was left as an exercise).
</li>
<li class="listitem">
Not thread-safe.
</li>
<li class="listitem">
Suffers from the static initialization problem.
</li>
</ul></div>
</li>
<li class="listitem">
<span class="emphasis"><em>MicroC/OS-II: The Real-Time Kernel</em></span>, by Jean J. Labrosse,
Chapter 7 and Appendix B.04.
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
An example of the Simple Segregated Storage scheme at work in the
internals of an actual OS.
</li>
<li class="listitem">
Missing aspects:
</li>
<li class="listitem">
Not portable (though this is OK, since it's part of its own OS).
</li>
<li class="listitem">
Cannot handle allocations of arbitrary numbers of blocks (which
is also OK, since this feature is not needed).
</li>
<li class="listitem">
Requires non-intuitive user code to create and destroy the Pool.
</li>
</ul></div>
</li>
<li class="listitem">
<span class="emphasis"><em>Efficient C++: Performance Programming Techniques</em></span>,
by Dov Bulka and David Mayhew, Chapters 6 and 7.
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
This is a good example of iteratively developing a Pool solutio.
</li>
<li class="listitem">
however, their premise (that the system-supplied allocation mechanism
is hopelessly inefficient) is flawed on every system I've tested
on.
</li>
<li class="listitem">
Run their timings on your system before you accept their conclusions.
</li>
<li class="listitem">
Missing aspect: Requires non-intuitive user code to create and
destroy the Pool.
</li>
</ul></div>
</li>
<li class="listitem">
<span class="emphasis"><em>Advanced C++: Programming Styles and Idioms</em></span>, by
James O. Coplien, Section 3.6.
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Has examples of both static and dynamic pooling, but missing aspects:
</li>
<li class="listitem">
Not thread-safe.
</li>
<li class="listitem">
The static pooling example is not portable.
</li>
</ul></div>
</li>
</ol></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tickets.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,54 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Appendix G: References</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../appendices.html" title="Appendices">
<link rel="prev" href="implementations.html" title="Appendix F: Other Implementations">
<link rel="next" href="todo.html" title="Appendix H: Future plans">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="implementations.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="todo.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.appendices.references"></a><a class="link" href="references.html" title="Appendix G: References">Appendix G: References</a>
</h3></div></div></div>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<a name="ref1"></a> Doug Lea, A Memory Allocator. See <a href="http://gee.cs.oswego.edu/dl/html/malloc.html" target="_top">http://gee.cs.oswego.edu/dl/html/malloc.html</a>
</li>
<li class="listitem">
<a name="ref2"></a>Paul R. Wilson, Mark S. Johnstone, Michael Neely,
and David Boles, <span class="emphasis"><em>Dynamic Storage Allocation: A Survey and Critical
Review</em></span> in International Workshop on Memory Management, September
1995, pg. 28, 36. See <a href="ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps" target="_top">ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps</a>
</li>
</ol></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="implementations.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="todo.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,46 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Appendix D: Tests</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../appendices.html" title="Appendices">
<link rel="prev" href="acknowledgements.html" title="Appendix C: Acknowledgements">
<link rel="next" href="tickets.html" title="Appendix E: Tickets">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="acknowledgements.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tickets.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.appendices.tests"></a><a class="link" href="tests.html" title="Appendix D: Tests">Appendix D: Tests</a>
</h3></div></div></div>
<p>
See folder <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">libs</span><span class="special">/</span><span class="identifier">pool</span><span class="special">/</span><span class="identifier">test</span><span class="special">/</span></code>.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="acknowledgements.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tickets.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,51 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Appendix E: Tickets</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../appendices.html" title="Appendices">
<link rel="prev" href="tests.html" title="Appendix D: Tests">
<link rel="next" href="implementations.html" title="Appendix F: Other Implementations">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tests.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="implementations.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.appendices.tickets"></a><a class="link" href="tickets.html" title="Appendix E: Tickets">Appendix E: Tickets</a>
</h3></div></div></div>
<p>
Report and view bugs and features by adding a ticket at <a href="https://svn.boost.org/trac/boost" target="_top">Boost.Trac</a>.
</p>
<p>
Existing open tickets for this library alone can be viewed <a href="https://svn.boost.org/trac/boost/query?status=assigned&amp;status=new&amp;status=reopened&amp;component=pool&amp;col=id&amp;col=summary&amp;col=status&amp;col=owner&amp;col=type&amp;col=milestone&amp;order=priority" target="_top">here</a>.
Existing tickets for this library - including closed ones - can be viewed
<a href="https://svn.boost.org/trac/boost/query?status=assigned&amp;status=closed&amp;status=new&amp;status=reopened&amp;component=pool&amp;col=id&amp;col=summary&amp;col=status&amp;col=owner&amp;col=type&amp;col=milestone&amp;order=priority" target="_top">here</a>.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tests.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="implementations.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,50 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Appendix H: Future plans</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../appendices.html" title="Appendices">
<link rel="prev" href="references.html" title="Appendix G: References">
<link rel="next" href="../indexes.html" title="Indexes">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="references.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../indexes.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.appendices.todo"></a><a class="link" href="todo.html" title="Appendix H: Future plans">Appendix H: Future plans</a>
</h3></div></div></div>
<p>
Another pool interface will be written: a base class for per-class pool allocation.
</p>
<p>
This "pool_base" interface will be Singleton Usage with Exceptions,
and built on the singleton_pool interface.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="references.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../appendices.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../indexes.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,49 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Indexes</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../index.html" title="Boost.Pool">
<link rel="prev" href="appendices/todo.html" title="Appendix H: Future plans">
<link rel="next" href="indexes/s01.html" title="Function Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="appendices/todo.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="indexes/s01.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_pool.indexes"></a><a class="link" href="indexes.html" title="Indexes">Indexes</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="indexes/s01.html">Function Index</a></span></dt>
<dt><span class="section"><a href="indexes/s02.html">Class Index</a></span></dt>
<dt><span class="section"><a href="indexes/s03.html">Typedef Index</a></span></dt>
<dt><span class="section"><a href="indexes/s04.html">Index</a></span></dt>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="appendices/todo.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="indexes/s01.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,327 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Function Index</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../indexes.html" title="Indexes">
<link rel="prev" href="../indexes.html" title="Indexes">
<link rel="next" href="s02.html" title="Class Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../indexes.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s02.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="id947354"></a>Function Index</h3></div></div></div>
<p><a class="link" href="s01.html#idx_id_0">A</a> <a class="link" href="s01.html#idx_id_2">C</a> <a class="link" href="s01.html#idx_id_3">D</a> <a class="link" href="s01.html#idx_id_5">F</a> <a class="link" href="s01.html#idx_id_6">G</a> <a class="link" href="s01.html#idx_id_8">I</a> <a class="link" href="s01.html#idx_id_10">M</a> <a class="link" href="s01.html#idx_id_11">N</a> <a class="link" href="s01.html#idx_id_12">O</a> <a class="link" href="s01.html#idx_id_13">P</a> <a class="link" href="s01.html#idx_id_14">R</a> <a class="link" href="s01.html#idx_id_15">S</a> <a class="link" href="s01.html#idx_id_16">T</a></p>
<div class="variablelist"><dl>
<dt>
<a name="idx_id_0"></a><span class="term">A</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">address</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.alignment" title="Guaranteeing Alignment - How we guarantee alignment portably."><span class="index-entry-level-1">Guaranteeing Alignment - How we guarantee alignment portably.</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">add_block</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.simple_segregated" title="Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)"><span class="index-entry-level-1">Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">add_ordered_block</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.simple_segregated" title="Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)"><span class="index-entry-level-1">Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">allocate</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_2"></a><span class="term">C</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">construct</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool" title="Object_pool"><span class="index-entry-level-1">Object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_3"></a><span class="term">D</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">deallocate</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">destroy</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool" title="Object_pool"><span class="index-entry-level-1">Object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_5"></a><span class="term">F</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">find_prev</span></p>
<div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">free</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool" title="Object_pool"><span class="index-entry-level-1">Object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.simple_segregated" title="Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)"><span class="index-entry-level-1">Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/default_user_allocator_malloc_free.html" title="Struct default_user_allocator_malloc_free"><span class="index-entry-level-1">Struct default_user_allocator_malloc_free</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/default_user_allocator_new_delete.html" title="Struct default_user_allocator_new_delete"><span class="index-entry-level-1">Struct default_user_allocator_new_delete</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">free_n</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.simple_segregated" title="Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)"><span class="index-entry-level-1">Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_6"></a><span class="term">G</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">get_pool</span></p>
<div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li></ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_8"></a><span class="term">I</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">is_from</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool" title="Object_pool"><span class="index-entry-level-1">Object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_10"></a><span class="term">M</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">main</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;"><span class="index-entry-level-1">Header &lt; boost/pool/pool_alloc.hpp &gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">malloc</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool" title="Object_pool"><span class="index-entry-level-1">Object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.simple_segregated" title="Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)"><span class="index-entry-level-1">Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/default_user_allocator_malloc_free.html" title="Struct default_user_allocator_malloc_free"><span class="index-entry-level-1">Struct default_user_allocator_malloc_free</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/default_user_allocator_new_delete.html" title="Struct default_user_allocator_new_delete"><span class="index-entry-level-1">Struct default_user_allocator_new_delete</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">malloc_n</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.simple_segregated" title="Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)"><span class="index-entry-level-1">Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">malloc_need_resize</span></p>
<div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">max_size</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_11"></a><span class="term">N</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">nextof</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_12"></a><span class="term">O</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">ordered_free</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.simple_segregated" title="Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)"><span class="index-entry-level-1">Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">ordered_free_n</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.simple_segregated" title="Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)"><span class="index-entry-level-1">Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">ordered_malloc</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">ordered_malloc_need_resize</span></p>
<div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li></ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_13"></a><span class="term">P</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">purge_memory</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_14"></a><span class="term">R</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">release_memory</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_15"></a><span class="term">S</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">segregate</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.simple_segregated" title="Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)"><span class="index-entry-level-1">Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">set_max_size</span></p>
<div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li></ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">set_next_size</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">sizeof</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.alignment" title="Guaranteeing Alignment - How we guarantee alignment portably."><span class="index-entry-level-1">Guaranteeing Alignment - How we guarantee alignment portably.</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;"><span class="index-entry-level-1">Header &lt; boost/pool/pool_alloc.hpp &gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.alignment.chunks" title="How Contiguous Chunks are Handled"><span class="index-entry-level-1">How Contiguous Chunks are Handled</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_16"></a><span class="term">T</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">try_malloc_n</span></p>
<div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li></ul></div>
</li></ul></div></dd>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../indexes.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s02.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,167 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class Index</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../indexes.html" title="Indexes">
<link rel="prev" href="s01.html" title="Function Index">
<link rel="next" href="s03.html" title="Typedef Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="s01.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s03.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="id948701"></a>Class Index</h3></div></div></div>
<p><a class="link" href="s02.html#idx_id_22">D</a> <a class="link" href="s02.html#idx_id_24">F</a> <a class="link" href="s02.html#idx_id_31">O</a> <a class="link" href="s02.html#idx_id_32">P</a> <a class="link" href="s02.html#idx_id_33">R</a> <a class="link" href="s02.html#idx_id_34">S</a></p>
<div class="variablelist"><dl>
<dt>
<a name="idx_id_22"></a><span class="term">D</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">default_user_allocator_malloc_free</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/default_user_allocator_malloc_free.html" title="Struct default_user_allocator_malloc_free"><span class="index-entry-level-1">Struct default_user_allocator_malloc_free</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">default_user_allocator_new_delete</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/default_user_allocator_new_delete.html" title="Struct default_user_allocator_new_delete"><span class="index-entry-level-1">Struct default_user_allocator_new_delete</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_24"></a><span class="term">F</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">fast_pool_allocator</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator_void__UserAllocat_id378528.html" title="Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;"><span class="index-entry-level-1">Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator/rebind.html" title="Struct template rebind"><span class="index-entry-level-1">Struct template rebind</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">fast_pool_allocator_tag</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator_tag.html" title="Struct fast_pool_allocator_tag"><span class="index-entry-level-1">Struct fast_pool_allocator_tag</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_31"></a><span class="term">O</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">object_creator</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool/object_creator.html" title="Struct object_creator"><span class="index-entry-level-1">Struct object_creator</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">object_pool</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><span class="bold"><strong><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool" title="Object_pool"><span class="index-entry-level-1">Object_pool</span></a></strong></span></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_32"></a><span class="term">P</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">pool</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><span class="bold"><strong><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></strong></span></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">pool_allocator</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator_void__UserAllocator__M_id378014.html" title="Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;"><span class="index-entry-level-1">Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><span class="bold"><strong><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></strong></span></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator/rebind.html" title="Struct template rebind"><span class="index-entry-level-1">Struct template rebind</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">pool_allocator_tag</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator_tag.html" title="Struct pool_allocator_tag"><span class="index-entry-level-1">Struct pool_allocator_tag</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_33"></a><span class="term">R</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">rebind</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator_void__UserAllocat_id378528.html" title="Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;"><span class="index-entry-level-1">Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator_void__UserAllocator__M_id378014.html" title="Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;"><span class="index-entry-level-1">Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator/rebind.html" title="Struct template rebind"><span class="index-entry-level-1">Struct template rebind</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_34"></a><span class="term">S</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">simple_segregated_storage</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.simple_segregated" title="Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)"><span class="index-entry-level-1">Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">singleton_pool</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><span class="bold"><strong><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></strong></span></p></li>
</ul></div>
</li>
</ul></div></dd>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="s01.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s03.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,207 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Typedef Index</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../indexes.html" title="Indexes">
<link rel="prev" href="s02.html" title="Class Index">
<link rel="next" href="s04.html" title="Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="s02.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s04.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="id949226"></a>Typedef Index</h3></div></div></div>
<p><a class="link" href="s03.html#idx_id_40">C</a> <a class="link" href="s03.html#idx_id_41">D</a> <a class="link" href="s03.html#idx_id_42">E</a> <a class="link" href="s03.html#idx_id_48">M</a> <a class="link" href="s03.html#idx_id_50">O</a> <a class="link" href="s03.html#idx_id_51">P</a> <a class="link" href="s03.html#idx_id_52">R</a> <a class="link" href="s03.html#idx_id_53">S</a> <a class="link" href="s03.html#idx_id_54">T</a> <a class="link" href="s03.html#idx_id_55">U</a> <a class="link" href="s03.html#idx_id_56">V</a></p>
<div class="variablelist"><dl>
<dt>
<a name="idx_id_40"></a><span class="term">C</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">const_pointer</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator_void__UserAllocat_id378528.html" title="Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;"><span class="index-entry-level-1">Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator_void__UserAllocator__M_id378014.html" title="Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;"><span class="index-entry-level-1">Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
</ul></div>
</li>
<li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">const_reference</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
</ul></div>
</li>
</ul></div></dd>
<dt>
<a name="idx_id_41"></a><span class="term">D</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">difference_type</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool" title="Object_pool"><span class="index-entry-level-1">Object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/default_user_allocator_malloc_free.html" title="Struct default_user_allocator_malloc_free"><span class="index-entry-level-1">Struct default_user_allocator_malloc_free</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/default_user_allocator_new_delete.html" title="Struct default_user_allocator_new_delete"><span class="index-entry-level-1">Struct default_user_allocator_new_delete</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_42"></a><span class="term">E</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">element_type</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool" title="Object_pool"><span class="index-entry-level-1">Object_pool</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_48"></a><span class="term">M</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">mutex</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_50"></a><span class="term">O</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">other</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator_void__UserAllocat_id378528.html" title="Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;"><span class="index-entry-level-1">Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator_void__UserAllocator__M_id378014.html" title="Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;"><span class="index-entry-level-1">Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator/rebind.html" title="Struct template rebind"><span class="index-entry-level-1">Struct template rebind</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_51"></a><span class="term">P</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">pointer</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator_void__UserAllocat_id378528.html" title="Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;"><span class="index-entry-level-1">Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator_void__UserAllocator__M_id378014.html" title="Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;"><span class="index-entry-level-1">Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_52"></a><span class="term">R</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">reference</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_53"></a><span class="term">S</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">size_type</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage"><span class="index-entry-level-1">Class template simple_segregated_storage</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool" title="Object_pool"><span class="index-entry-level-1">Object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/pooling.html#boost_pool.pool.pooling.simple_segregated" title="Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)"><span class="index-entry-level-1">Simple Segregated Storage (Not for the faint of heart - Embedded programmers only!)</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/default_user_allocator_malloc_free.html" title="Struct default_user_allocator_malloc_free"><span class="index-entry-level-1">Struct default_user_allocator_malloc_free</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/default_user_allocator_new_delete.html" title="Struct default_user_allocator_new_delete"><span class="index-entry-level-1">Struct default_user_allocator_new_delete</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_54"></a><span class="term">T</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">tag</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_55"></a><span class="term">U</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">user_allocator</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/object_pool.html" title="Class template object_pool"><span class="index-entry-level-1">Class template object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool.html" title="Class template pool"><span class="index-entry-level-1">Class template pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool"><span class="index-entry-level-1">Class template singleton_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool" title="Object_pool"><span class="index-entry-level-1">Object_pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool"><span class="index-entry-level-1">pool</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool"><span class="index-entry-level-1">Singleton_pool</span></a></p></li>
</ul></div>
</li></ul></div></dd>
<dt>
<a name="idx_id_56"></a><span class="term">V</span>
</dt>
<dd><div class="index"><ul class="index" type="none" compact><li class="listitem" style="list-style-type: none">
<p><span class="index-entry-level-0">value_type</span></p>
<div class="index"><ul class="index" type="none" compact>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator"><span class="index-entry-level-1">Class template fast_pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/fast_pool_allocator_void__UserAllocat_id378528.html" title="Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;"><span class="index-entry-level-1">Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator"><span class="index-entry-level-1">Class template pool_allocator</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../../boost/pool_allocator_void__UserAllocator__M_id378014.html" title="Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;"><span class="index-entry-level-1">Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;</span></a></p></li>
<li class="listitem" style="list-style-type: none"><p><a class="link" href="../pool/interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator"><span class="index-entry-level-1">pool_allocator</span></a></p></li>
</ul></div>
</li></ul></div></dd>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="s02.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../indexes.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="s04.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,66 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Introduction and Overview</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Pool">
<link rel="up" href="../index.html" title="Boost.Pool">
<link rel="prev" href="../index.html" title="Boost.Pool">
<link rel="next" href="pool/conventions.html" title="Documentation Naming and Formatting Conventions">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pool/conventions.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_pool.pool"></a><a class="link" href="pool.html" title="Introduction and Overview">Introduction and Overview</a>
</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="pool/conventions.html">Documentation Naming and
Formatting Conventions</a></span></dt>
<dt><span class="section"><a href="pool/introduction.html">Introduction</a></span></dt>
<dt><span class="section"><a href="pool/usage.html">How do I use Pool?</a></span></dt>
<dt><span class="section"><a href="pool/installation.html">Installation</a></span></dt>
<dt><span class="section"><a href="pool/testing.html">Building the Test Programs</a></span></dt>
<dt><span class="section"><a href="pool/interfaces.html">Boost Pool Interfaces - What
interfaces are provided and when to use each one.</a></span></dt>
<dd><dl><dt><span class="section"><a href="pool/interfaces.html#boost_pool.pool.interfaces.interfaces">Pool Interfaces</a></span></dt></dl></dd>
<dt><span class="section"><a href="pool/pooling.html">Pool in More Depth</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="pool/pooling.html#boost_pool.pool.pooling.concepts">Basic ideas behind
pooling</a></span></dt>
<dt><span class="section"><a href="pool/pooling.html#boost_pool.pool.pooling.simple">Simple Segregated Storage</a></span></dt>
<dt><span class="section"><a href="pool/pooling.html#boost_pool.pool.pooling.alignment">Guaranteeing Alignment
- How we guarantee alignment portably.</a></span></dt>
<dt><span class="section"><a href="pool/pooling.html#boost_pool.pool.pooling.simple_segregated">Simple Segregated
Storage (Not for the faint of heart - Embedded programmers only!)</a></span></dt>
<dt><span class="section"><a href="pool/pooling.html#boost_pool.pool.pooling.user_allocator">The UserAllocator
Concept</a></span></dt>
</dl></dd>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../index.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pool/conventions.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,93 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Documentation Naming and Formatting Conventions</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../pool.html" title="Introduction and Overview">
<link rel="prev" href="../pool.html" title="Introduction and Overview">
<link rel="next" href="introduction.html" title="Introduction">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../pool.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="introduction.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.pool.conventions"></a><a class="link" href="conventions.html" title="Documentation Naming and Formatting Conventions">Documentation Naming and
Formatting Conventions</a>
</h3></div></div></div>
<p>
This documentation makes use of the following naming and formatting conventions.
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Code is in <code class="computeroutput"><span class="identifier">fixed</span> <span class="identifier">width</span>
<span class="identifier">font</span></code> and is syntax-highlighted
in color.
</li>
<li class="listitem">
Replaceable text that you will need to supply is in <em class="replaceable"><code>italics</code></em>.
</li>
<li class="listitem">
Free functions are rendered in the <code class="computeroutput"><span class="identifier">code</span>
<span class="identifier">font</span></code> followed by <code class="computeroutput"><span class="special">()</span></code>, as in <code class="computeroutput"><span class="identifier">free_function</span><span class="special">()</span></code>.
</li>
<li class="listitem">
If a name refers to a class template, it is specified like this: <code class="computeroutput"><span class="identifier">class_template</span><span class="special">&lt;&gt;</span></code>;
that is, it is in code font and its name is followed by <code class="computeroutput"><span class="special">&lt;&gt;</span></code> to indicate that it is a class
template.
</li>
<li class="listitem">
If a name refers to a function-like macro, it is specified like this:
<code class="computeroutput"><span class="identifier">MACRO</span><span class="special">()</span></code>;
that is, it is uppercase in code font and its name is followed by <code class="computeroutput"><span class="special">()</span></code> to indicate that it is a function-like
macro. Object-like macros appear without the trailing <code class="computeroutput"><span class="special">()</span></code>.
</li>
<li class="listitem">
Names that refer to <span class="emphasis"><em>concepts</em></span> in the generic programming
sense are specified in CamelCase.
</li>
</ul></div>
<div class="note"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top"><p>
In addition, notes such as this one specify non-essential information that
provides additional background or rationale.
</p></td></tr>
</table></div>
<p>
Finally, you can mentally add the following to any code fragments in this
document:
</p>
<pre class="programlisting"><span class="comment">// Include all of Pool files</span>
<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">pool</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../pool.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="introduction.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,48 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Installation</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../pool.html" title="Introduction and Overview">
<link rel="prev" href="usage.html" title="How do I use Pool?">
<link rel="next" href="testing.html" title="Building the Test Programs">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="usage.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="testing.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.pool.installation"></a><a class="link" href="installation.html" title="Installation">Installation</a>
</h3></div></div></div>
<p>
The Boost Pool library is a header-only library. That means there is no .lib,
.dll, or .so to build; just add the Boost directory to your compiler's include
file path, and you should be good to go!
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="usage.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="testing.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,576 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Boost Pool Interfaces - What interfaces are provided and when to use each one.</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../pool.html" title="Introduction and Overview">
<link rel="prev" href="testing.html" title="Building the Test Programs">
<link rel="next" href="pooling.html" title="Pool in More Depth">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="testing.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pooling.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.pool.interfaces"></a><a class="link" href="interfaces.html" title="Boost Pool Interfaces - What interfaces are provided and when to use each one.">Boost Pool Interfaces - What
interfaces are provided and when to use each one.</a>
</h3></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="interfaces.html#boost_pool.pool.interfaces.interfaces">Pool Interfaces</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="interfaces.html#boost_pool.pool.interfaces.interfaces.pool">pool</a></span></dt>
<dt><span class="section"><a href="interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool">Object_pool</a></span></dt>
<dt><span class="section"><a href="interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool">Singleton_pool</a></span></dt>
<dt><span class="section"><a href="interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator">pool_allocator</a></span></dt>
</dl></dd>
</dl></div>
<h5>
<a name="boost_pool.pool.interfaces.h0"></a>
<span><a name="boost_pool.pool.interfaces.introduction"></a></span><a class="link" href="interfaces.html#boost_pool.pool.interfaces.introduction">Introduction</a>
</h5>
<p>
There are several interfaces provided which allow users great flexibility
in how they want to use Pools. Review the <a class="link" href="pooling.html#boost_pool.pool.pooling.concepts" title="Basic ideas behind pooling">concepts</a>
document to get the basic understanding of how the various pools work.
</p>
<h4>
<a name="boost_pool.pool.interfaces.h1"></a>
<span><a name="boost_pool.pool.interfaces.terminology_and_tradeoffs"></a></span><a class="link" href="interfaces.html#boost_pool.pool.interfaces.terminology_and_tradeoffs">Terminology
and Tradeoffs</a>
</h4>
<h6>
<a name="boost_pool.pool.interfaces.h2"></a>
<span><a name="boost_pool.pool.interfaces.object_usage_vs__singleton_usage"></a></span><a class="link" href="interfaces.html#boost_pool.pool.interfaces.object_usage_vs__singleton_usage">Object
Usage vs. Singleton Usage</a>
</h6>
<p>
Object Usage is the method where each Pool is an object that may be created
and destroyed. Destroying a Pool implicitly frees all chunks that have been
allocated from it.
</p>
<p>
Singleton Usage is the method where each Pool is an object with static duration;
that is, it will not be destroyed until program exit. Pool objects with Singleton
Usage may be shared; thus, Singleton Usage implies thread-safety as well.
System memory allocated by Pool objects with Singleton Usage may be freed
through release_memory or purge_memory.
</p>
<h6>
<a name="boost_pool.pool.interfaces.h3"></a>
<span><a name="boost_pool.pool.interfaces.out_of_memory_conditions__exceptions_vs__null_return"></a></span><a class="link" href="interfaces.html#boost_pool.pool.interfaces.out_of_memory_conditions__exceptions_vs__null_return">Out-of-Memory
Conditions: Exceptions vs. Null Return</a>
</h6>
<p>
Some Pool interfaces throw exceptions when out-of-memory; others will <code class="computeroutput"><span class="keyword">return</span> <span class="number">0</span></code>. In
general, unless mandated by the Standard, Pool interfaces will always prefer
to <code class="computeroutput"><span class="keyword">return</span> <span class="number">0</span></code>
instead of throwing an exception.
</p>
<h6>
<a name="boost_pool.pool.interfaces.h4"></a>
<span><a name="boost_pool.pool.interfaces.ordered_versus_unordered"></a></span><a class="link" href="interfaces.html#boost_pool.pool.interfaces.ordered_versus_unordered">Ordered
versus unordered</a>
</h6>
<p>
An ordered pool maintains it's free list in order of the address of each
free block - this is the most efficient way if you're likely to allocate
arrays of objects. However, freeing an object can be O(N) in the number of
currently free blocks which can be prohibitively expensive in some situations.
</p>
<p>
An unordered pool does not maintain it's free list in any particular order,
as a result allocation and freeing single objects is very fast, but allocating
arrays may be slow (and in particular the pool may not be aware that it contains
enough free memory for the allocation request, and unnecessarily allocate
more memory).
</p>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_pool.pool.interfaces.interfaces"></a><a class="link" href="interfaces.html#boost_pool.pool.interfaces.interfaces" title="Pool Interfaces">Pool Interfaces</a>
</h4></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="interfaces.html#boost_pool.pool.interfaces.interfaces.pool">pool</a></span></dt>
<dt><span class="section"><a href="interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool">Object_pool</a></span></dt>
<dt><span class="section"><a href="interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool">Singleton_pool</a></span></dt>
<dt><span class="section"><a href="interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator">pool_allocator</a></span></dt>
</dl></div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_pool.pool.interfaces.interfaces.pool"></a><a class="link" href="interfaces.html#boost_pool.pool.interfaces.interfaces.pool" title="pool">pool</a>
</h5></div></div></div>
<p>
The <code class="computeroutput"><a class="link" href="../../boost/pool.html" title="Class template pool">pool</a></code> interface is a simple
Object Usage interface with Null Return.
</p>
<p>
<code class="computeroutput"><a class="link" href="../../boost/pool.html" title="Class template pool">pool</a></code> is a fast memory allocator,
and guarantees proper alignment of all allocated chunks.
</p>
<p>
<code class="computeroutput"><a class="link" href="../../header/boost/pool/pool_hpp.html" title="Header &lt;boost/pool/pool.hpp&gt;">pool.hpp</a></code> provides
two <a class="link" href="pooling.html#boost_pool.pool.pooling.user_allocator" title="The UserAllocator Concept">UserAllocator</a>
classes and a <code class="computeroutput"><a class="link" href="../../boost/pool.html" title="Class template pool">template class pool</a></code>,
which extends and generalizes the framework provided by the <a class="link" href="pooling.html#boost_pool.pool.pooling.simple" title="Simple Segregated Storage">Simple
Segregated Storage</a> solution. For information on other pool-based
interfaces, see the other <a class="link" href="interfaces.html" title="Boost Pool Interfaces - What interfaces are provided and when to use each one.">Pool
Interfaces</a>.
</p>
<p>
<span class="bold"><strong>Synopsis</strong></span>
</p>
<p>
There are two <a class="link" href="pooling.html#boost_pool.pool.pooling.user_allocator" title="The UserAllocator Concept">UserAllocator</a>
classes provided. Both of them are in <code class="computeroutput"><a class="link" href="../../header/boost/pool/pool_hpp.html" title="Header &lt;boost/pool/pool.hpp&gt;">pool.hpp</a></code>.
</p>
<p>
The default value for the template parameter <a class="link" href="pooling.html#boost_pool.pool.pooling.user_allocator" title="The UserAllocator Concept">UserAllocator</a>
is always <code class="computeroutput"><span class="identifier">default_user_allocator_new_delete</span></code>.
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">default_user_allocator_new_delete</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">size_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">difference_type</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">malloc</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> <span class="identifier">bytes</span><span class="special">)</span>
<span class="special">{</span> <span class="keyword">return</span> <span class="keyword">new</span> <span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">nothrow</span><span class="special">)</span> <span class="keyword">char</span><span class="special">[</span><span class="identifier">bytes</span><span class="special">];</span> <span class="special">}</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">free</span><span class="special">(</span><span class="keyword">char</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">block</span><span class="special">)</span>
<span class="special">{</span> <span class="keyword">delete</span> <span class="special">[]</span> <span class="identifier">block</span><span class="special">;</span> <span class="special">}</span>
<span class="special">};</span>
<span class="keyword">struct</span> <span class="identifier">default_user_allocator_malloc_free</span>
<span class="special">{</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">size_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span> <span class="identifier">difference_type</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">malloc</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> <span class="identifier">bytes</span><span class="special">)</span>
<span class="special">{</span> <span class="keyword">return</span> <span class="keyword">reinterpret_cast</span><span class="special">&lt;</span><span class="keyword">char</span> <span class="special">*&gt;(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">malloc</span><span class="special">(</span><span class="identifier">bytes</span><span class="special">));</span> <span class="special">}</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">free</span><span class="special">(</span><span class="keyword">char</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">block</span><span class="special">)</span>
<span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">free</span><span class="special">(</span><span class="identifier">block</span><span class="special">);</span> <span class="special">}</span>
<span class="special">};</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">UserAllocator</span> <span class="special">=</span> <span class="identifier">default_user_allocator_new_delete</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">pool</span>
<span class="special">{</span>
<span class="keyword">private</span><span class="special">:</span>
<span class="identifier">pool</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pool</span> <span class="special">&amp;);</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">pool</span> <span class="special">&amp;);</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">typedef</span> <span class="identifier">UserAllocator</span> <span class="identifier">user_allocator</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">UserAllocator</span><span class="special">::</span><span class="identifier">size_type</span> <span class="identifier">size_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">UserAllocator</span><span class="special">::</span><span class="identifier">difference_type</span> <span class="identifier">difference_type</span><span class="special">;</span>
<span class="keyword">explicit</span> <span class="identifier">pool</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">requested_size</span><span class="special">);</span>
<span class="special">~</span><span class="identifier">pool</span><span class="special">();</span>
<span class="keyword">bool</span> <span class="identifier">release_memory</span><span class="special">();</span>
<span class="keyword">bool</span> <span class="identifier">purge_memory</span><span class="special">();</span>
<span class="keyword">bool</span> <span class="identifier">is_from</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> <span class="identifier">chunk</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">size_type</span> <span class="identifier">get_requested_size</span><span class="special">()</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">void</span> <span class="special">*</span> <span class="identifier">malloc</span><span class="special">();</span>
<span class="keyword">void</span> <span class="special">*</span> <span class="identifier">ordered_malloc</span><span class="special">();</span>
<span class="keyword">void</span> <span class="special">*</span> <span class="identifier">ordered_malloc</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">);</span>
<span class="keyword">void</span> <span class="identifier">free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> <span class="identifier">chunk</span><span class="special">);</span>
<span class="keyword">void</span> <span class="identifier">ordered_free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> <span class="identifier">chunk</span><span class="special">);</span>
<span class="keyword">void</span> <span class="identifier">free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> <span class="identifier">chunks</span><span class="special">,</span> <span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">);</span>
<span class="keyword">void</span> <span class="identifier">ordered_free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> <span class="identifier">chunks</span><span class="special">,</span> <span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">);</span>
<span class="special">};</span>
</pre>
<p>
</p>
<p>
<span class="bold"><strong>Example:</strong></span>
</p>
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">func</span><span class="special">()</span>
<span class="special">{</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">pool</span><span class="special">&lt;&gt;</span> <span class="identifier">p</span><span class="special">(</span><span class="keyword">sizeof</span><span class="special">(</span><span class="keyword">int</span><span class="special">));</span>
<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">10000</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
<span class="special">{</span>
<span class="keyword">int</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">malloc</span><span class="special">();</span>
<span class="special">...</span> <span class="comment">// Do something with t; don't take the time to free() it.</span>
<span class="special">}</span>
<span class="special">}</span> <span class="comment">// on function exit, p is destroyed, and all malloc()'ed ints are implicitly freed.</span>
</pre>
<p>
</p>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_pool.pool.interfaces.interfaces.object_pool"></a><a class="link" href="interfaces.html#boost_pool.pool.interfaces.interfaces.object_pool" title="Object_pool">Object_pool</a>
</h5></div></div></div>
<p>
The <code class="computeroutput"><a class="link" href="../../boost/object_pool.html" title="Class template object_pool">template class object_pool</a></code>
interface is an Object Usage interface with Null Return, but is aware
of the type of the object for which it is allocating chunks. On destruction,
any chunks that have been allocated from that <code class="computeroutput"><span class="identifier">object_pool</span></code>
will have their destructors called.
</p>
<p>
<code class="computeroutput"><a class="link" href="../../header/boost/pool/object_pool_hpp.html" title="Header &lt;boost/pool/object_pool.hpp&gt;">object_pool.hpp</a></code>
provides a template type that can be used for fast and efficient memory
allocation. It also provides automatic destruction of non-deallocated
objects.
</p>
<p>
For information on other pool-based interfaces, see the other <a class="link" href="interfaces.html" title="Boost Pool Interfaces - What interfaces are provided and when to use each one.">Pool
Interfaces</a>.
</p>
<p>
<span class="bold"><strong>Synopsis</strong></span>
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">ElementType</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">UserAllocator</span> <span class="special">=</span> <span class="identifier">default_user_allocator_new_delete</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">object_pool</span>
<span class="special">{</span>
<span class="keyword">private</span><span class="special">:</span>
<span class="identifier">object_pool</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">object_pool</span> <span class="special">&amp;);</span>
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">object_pool</span> <span class="special">&amp;);</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">typedef</span> <span class="identifier">ElementType</span> <span class="identifier">element_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">UserAllocator</span> <span class="identifier">user_allocator</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">pool</span><span class="special">&lt;</span><span class="identifier">UserAllocator</span><span class="special">&gt;::</span><span class="identifier">size_type</span> <span class="identifier">size_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">pool</span><span class="special">&lt;</span><span class="identifier">UserAllocator</span><span class="special">&gt;::</span><span class="identifier">difference_type</span> <span class="identifier">difference_type</span><span class="special">;</span>
<span class="identifier">object_pool</span><span class="special">();</span>
<span class="special">~</span><span class="identifier">object_pool</span><span class="special">();</span>
<span class="identifier">element_type</span> <span class="special">*</span> <span class="identifier">malloc</span><span class="special">();</span>
<span class="keyword">void</span> <span class="identifier">free</span><span class="special">(</span><span class="identifier">element_type</span> <span class="special">*</span> <span class="identifier">p</span><span class="special">);</span>
<span class="keyword">bool</span> <span class="identifier">is_from</span><span class="special">(</span><span class="identifier">element_type</span> <span class="special">*</span> <span class="identifier">p</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="identifier">element_type</span> <span class="special">*</span> <span class="identifier">construct</span><span class="special">();</span>
<span class="comment">// other construct() functions</span>
<span class="keyword">void</span> <span class="identifier">destroy</span><span class="special">(</span><span class="identifier">element_type</span> <span class="special">*</span> <span class="identifier">p</span><span class="special">);</span>
<span class="special">};</span>
</pre>
<p>
<span class="bold"><strong>Template Parameters</strong></span>
</p>
<p>
<span class="emphasis"><em>ElementType</em></span>
</p>
<p>
The template parameter is the type of object to allocate/deallocate.
It must have a non-throwing destructor.
</p>
<p>
<span class="emphasis"><em>UserAllocator</em></span>
</p>
<p>
Defines the method that the underlying Pool will use to allocate memory
from the system. Default is default_user_allocator_new_delete. See __<a class="link" href="pooling.html#boost_pool.pool.pooling.user_allocator" title="The UserAllocator Concept">UserAllocator</a>
for details.
</p>
<p>
<span class="bold"><strong>Example:</strong></span> struct X { ... }; // has destructor
with side-effects.
</p>
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">func</span><span class="special">()</span>
<span class="special">{</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">object_pool</span><span class="special">&lt;</span><span class="identifier">X</span><span class="special">&gt;</span> <span class="identifier">p</span><span class="special">;</span>
<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">10000</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
<span class="special">{</span>
<span class="identifier">X</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">p</span><span class="special">.</span><span class="identifier">malloc</span><span class="special">();</span>
<span class="special">...</span> <span class="comment">// Do something with t; don't take the time to free() it.</span>
<span class="special">}</span>
<span class="special">}</span> <span class="comment">// on function exit, p is destroyed, and all destructors for the X objects are called.</span>
</pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_pool.pool.interfaces.interfaces.singleton_pool"></a><a class="link" href="interfaces.html#boost_pool.pool.interfaces.interfaces.singleton_pool" title="Singleton_pool">Singleton_pool</a>
</h5></div></div></div>
<p>
The <code class="computeroutput"><a class="link" href="../../boost/singleton_pool.html" title="Class template singleton_pool">singleton_pool interface</a></code>
at <code class="computeroutput"><a class="link" href="../../header/boost/pool/singleton_pool_hpp.html" title="Header &lt;boost/pool/singleton_pool.hpp&gt;">singleton_pool.hpp</a></code>
is a Singleton Usage interface with Null Return. It's just the same as
the pool interface but with Singleton Usage instead.
</p>
<p>
<span class="bold"><strong>Synopsis</strong></span>
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Tag</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">RequestedSize</span><span class="special">,</span>
<span class="keyword">typename</span> <span class="identifier">UserAllocator</span> <span class="special">=</span> <span class="identifier">default_user_allocator_new_delete</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">singleton_pool</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">typedef</span> <span class="identifier">Tag</span> <span class="identifier">tag</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">UserAllocator</span> <span class="identifier">user_allocator</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">pool</span><span class="special">&lt;</span><span class="identifier">UserAllocator</span><span class="special">&gt;::</span><span class="identifier">size_type</span> <span class="identifier">size_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">pool</span><span class="special">&lt;</span><span class="identifier">UserAllocator</span><span class="special">&gt;::</span><span class="identifier">difference_type</span> <span class="identifier">difference_type</span><span class="special">;</span>
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="identifier">requested_size</span> <span class="special">=</span> <span class="identifier">RequestedSize</span><span class="special">;</span>
<span class="keyword">private</span><span class="special">:</span>
<span class="keyword">static</span> <span class="identifier">pool</span><span class="special">&lt;</span><span class="identifier">size_type</span><span class="special">&gt;</span> <span class="identifier">p</span><span class="special">;</span> <span class="comment">// exposition only!</span>
<span class="identifier">singleton_pool</span><span class="special">();</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">static</span> <span class="keyword">bool</span> <span class="identifier">is_from</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> <span class="identifier">ptr</span><span class="special">);</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span> <span class="identifier">malloc</span><span class="special">();</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span> <span class="identifier">ordered_malloc</span><span class="special">();</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="special">*</span> <span class="identifier">ordered_malloc</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">);</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> <span class="identifier">ptr</span><span class="special">);</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">ordered_free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> <span class="identifier">ptr</span><span class="special">);</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> <span class="identifier">ptr</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">n</span><span class="special">);</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">ordered_free</span><span class="special">(</span><span class="keyword">void</span> <span class="special">*</span> <span class="identifier">ptr</span><span class="special">,</span> <span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">);</span>
<span class="keyword">static</span> <span class="keyword">bool</span> <span class="identifier">release_memory</span><span class="special">();</span>
<span class="keyword">static</span> <span class="keyword">bool</span> <span class="identifier">purge_memory</span><span class="special">();</span>
<span class="special">};</span>
</pre>
<p>
<span class="bold"><strong>Notes</strong></span>
</p>
<p>
The underlying pool <code class="computeroutput"><span class="identifier">p</span></code>
referenced by the static functions in <code class="computeroutput"><span class="identifier">singleton_pool</span></code>
is actually declared in a way so that it is:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Thread-safe if there is only one thread running before <code class="computeroutput"><span class="identifier">main</span><span class="special">()</span></code>
begins and after <code class="computeroutput"><span class="identifier">main</span><span class="special">()</span></code> ends. All of the static functions
of singleton_pool synchronize their access to <code class="computeroutput"><span class="identifier">p</span></code>.
</li>
<li class="listitem">
Guaranteed to be constructed before it is used, so that the simple
static object in the synopsis above would actually be an incorrect
implementation. The actual implementation to guarantee this is considerably
more complicated.
</li>
</ul></div>
<p>
<span class="bold"><strong>Note</strong></span> that a different underlying pool
<code class="computeroutput"><span class="identifier">p</span></code> exists for each different
set of template parameters, including implementation-specific ones.
</p>
<p>
<span class="bold"><strong>Template Parameters</strong></span>
</p>
<p>
<span class="emphasis"><em>Tag</em></span>
</p>
<p>
The <span class="emphasis"><em>Tag</em></span> template parameter allows different unbounded
sets of singleton pools to exist. For example, the pool allocators use
two tag classes to ensure that the two different allocator types never
share the same underlying singleton pool.
</p>
<p>
<span class="emphasis"><em>Tag</em></span> is never actually used by <code class="computeroutput"><span class="identifier">singleton_pool</span></code>.
</p>
<p>
<span class="emphasis"><em>RequestedSize</em></span> The requested size of memory chunks
to allocate. This is passed as a constructor parameter to the underlying
pool. Must be greater than 0.
</p>
<p>
<span class="emphasis"><em>UserAllocator</em></span>
</p>
<p>
Defines the method that the underlying pool will use to allocate memory
from the system. See User Allocators for details.
</p>
<p>
<span class="bold"><strong>Example:</strong></span> struct MyPoolTag { };
</p>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">singleton_pool</span><span class="special">&lt;</span><span class="identifier">MyPoolTag</span><span class="special">,</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="keyword">int</span><span class="special">)&gt;</span> <span class="identifier">my_pool</span><span class="special">;</span>
<span class="keyword">void</span> <span class="identifier">func</span><span class="special">()</span>
<span class="special">{</span>
<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">10000</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
<span class="special">{</span>
<span class="keyword">int</span> <span class="special">*</span> <span class="keyword">const</span> <span class="identifier">t</span> <span class="special">=</span> <span class="identifier">my_pool</span><span class="special">::</span><span class="identifier">malloc</span><span class="special">();</span>
<span class="special">...</span> <span class="comment">// Do something with t; don't take the time to free() it.</span>
<span class="special">}</span>
<span class="comment">// Explicitly free all malloc()'ed ints.</span>
<span class="identifier">my_pool</span><span class="special">::</span><span class="identifier">purge_memory</span><span class="special">();</span>
<span class="special">}</span>
</pre>
</div>
<div class="section">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_pool.pool.interfaces.interfaces.pool_allocator"></a><a class="link" href="interfaces.html#boost_pool.pool.interfaces.interfaces.pool_allocator" title="pool_allocator">pool_allocator</a>
</h5></div></div></div>
<p>
The <code class="computeroutput"><a class="link" href="../../boost/pool_allocator.html" title="Class template pool_allocator">pool_allocator interface</a></code>
is a Singleton Usage interface with Exceptions. It is built on the singleton_pool
interface, and provides a Standard Allocator-compliant class (for use
in containers, etc.).
</p>
<p>
<span class="bold"><strong>Introduction</strong></span>
</p>
<p>
<code class="computeroutput"><a class="link" href="../../header/boost/pool/pool_alloc_hpp.html" title="Header &lt;boost/pool/pool_alloc.hpp&gt;">pool_alloc.hpp</a></code>
</p>
<p>
Provides two template types that can be used for fast and efficient memory
allocation. These types both satisfy the Standard Allocator requirements
[20.1.5] and the additional requirements in [20.1.5/4], so they can be
used with Standard or user-supplied containers.
</p>
<p>
For information on other pool-based interfaces, see the other <a class="link" href="interfaces.html" title="Boost Pool Interfaces - What interfaces are provided and when to use each one.">Pool
Interfaces</a>.
</p>
<p>
<span class="bold"><strong>Synopsis</strong></span>
</p>
<p>
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">pool_allocator_tag</span> <span class="special">{</span> <span class="special">};</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">,</span>
<span class="keyword">typename</span> <span class="identifier">UserAllocator</span> <span class="special">=</span> <span class="identifier">default_user_allocator_new_delete</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">pool_allocator</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">typedef</span> <span class="identifier">UserAllocator</span> <span class="identifier">user_allocator</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">value_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="special">*</span> <span class="identifier">pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">*</span> <span class="identifier">const_pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="special">&amp;</span> <span class="identifier">reference</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">&amp;</span> <span class="identifier">const_reference</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">pool</span><span class="special">&lt;</span><span class="identifier">UserAllocator</span><span class="special">&gt;::</span><span class="identifier">size_type</span> <span class="identifier">size_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">pool</span><span class="special">&lt;</span><span class="identifier">UserAllcoator</span><span class="special">&gt;::</span><span class="identifier">difference_type</span> <span class="identifier">difference_type</span><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">rebind</span>
<span class="special">{</span> <span class="keyword">typedef</span> <span class="identifier">pool_allocator</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">&gt;</span> <span class="identifier">other</span><span class="special">;</span> <span class="special">};</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="identifier">pool_allocator</span><span class="special">();</span>
<span class="identifier">pool_allocator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pool_allocator</span> <span class="special">&amp;);</span>
<span class="comment">// The following is not explicit, mimicking std::allocator [20.4.1]</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">&gt;</span>
<span class="identifier">pool_allocator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pool_allocator</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">&gt;</span> <span class="special">&amp;);</span>
<span class="identifier">pool_allocator</span> <span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">pool_allocator</span> <span class="special">&amp;);</span>
<span class="special">~</span><span class="identifier">pool_allocator</span><span class="special">();</span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">address</span><span class="special">(</span><span class="identifier">reference</span> <span class="identifier">r</span><span class="special">);</span>
<span class="keyword">static</span> <span class="identifier">const_pointer</span> <span class="identifier">address</span><span class="special">(</span><span class="identifier">const_reference</span> <span class="identifier">s</span><span class="special">);</span>
<span class="keyword">static</span> <span class="identifier">size_type</span> <span class="identifier">max_size</span><span class="special">();</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">construct</span><span class="special">(</span><span class="identifier">pointer</span> <span class="identifier">ptr</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">&amp;</span> <span class="identifier">t</span><span class="special">);</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">destroy</span><span class="special">(</span><span class="identifier">pointer</span> <span class="identifier">ptr</span><span class="special">);</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">pool_allocator</span> <span class="special">&amp;)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">pool_allocator</span> <span class="special">&amp;)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">allocate</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">);</span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">allocate</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">pointer</span><span class="special">);</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">deallocate</span><span class="special">(</span><span class="identifier">pointer</span> <span class="identifier">ptr</span><span class="special">,</span> <span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">);</span>
<span class="special">};</span>
<span class="keyword">struct</span> <span class="identifier">fast_pool_allocator_tag</span> <span class="special">{</span> <span class="special">};</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span>
<span class="keyword">typename</span> <span class="identifier">UserAllocator</span> <span class="special">=</span> <span class="identifier">default_user_allocator_new_delete</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">fast_pool_allocator</span>
<span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="keyword">typedef</span> <span class="identifier">UserAllocator</span> <span class="identifier">user_allocator</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">T</span> <span class="identifier">value_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="special">*</span> <span class="identifier">pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">*</span> <span class="identifier">const_pointer</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">value_type</span> <span class="special">&amp;</span> <span class="identifier">reference</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">&amp;</span> <span class="identifier">const_reference</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">pool</span><span class="special">&lt;</span><span class="identifier">UserAllocator</span><span class="special">&gt;::</span><span class="identifier">size_type</span> <span class="identifier">size_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">pool</span><span class="special">&lt;</span><span class="identifier">UserAllocator</span><span class="special">&gt;::</span><span class="identifier">difference_type</span> <span class="identifier">difference_type</span><span class="special">;</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">rebind</span>
<span class="special">{</span> <span class="keyword">typedef</span> <span class="identifier">fast_pool_allocator</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">&gt;</span> <span class="identifier">other</span><span class="special">;</span> <span class="special">};</span>
<span class="keyword">public</span><span class="special">:</span>
<span class="identifier">fast_pool_allocator</span><span class="special">();</span>
<span class="identifier">fast_pool_allocator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">fast_pool_allocator</span> <span class="special">&amp;);</span>
<span class="comment">// The following is not explicit, mimicking std::allocator [20.4.1]</span>
<span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">&gt;</span>
<span class="identifier">fast_pool_allocator</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">fast_pool_allocator</span><span class="special">&lt;</span><span class="identifier">U</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">&gt;</span> <span class="special">&amp;);</span>
<span class="identifier">fast_pool_allocator</span> <span class="special">&amp;</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">fast_pool_allocator</span> <span class="special">&amp;);</span>
<span class="special">~</span><span class="identifier">fast_pool_allocator</span><span class="special">();</span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">address</span><span class="special">(</span><span class="identifier">reference</span> <span class="identifier">r</span><span class="special">);</span>
<span class="keyword">static</span> <span class="identifier">const_pointer</span> <span class="identifier">address</span><span class="special">(</span><span class="identifier">const_reference</span> <span class="identifier">s</span><span class="special">);</span>
<span class="keyword">static</span> <span class="identifier">size_type</span> <span class="identifier">max_size</span><span class="special">();</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">construct</span><span class="special">(</span><span class="identifier">pointer</span> <span class="identifier">ptr</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">value_type</span> <span class="special">&amp;</span> <span class="identifier">t</span><span class="special">);</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">destroy</span><span class="special">(</span><span class="identifier">pointer</span> <span class="identifier">ptr</span><span class="special">);</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">==(</span><span class="keyword">const</span> <span class="identifier">fast_pool_allocator</span> <span class="special">&amp;)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">bool</span> <span class="keyword">operator</span><span class="special">!=(</span><span class="keyword">const</span> <span class="identifier">fast_pool_allocator</span> <span class="special">&amp;)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">allocate</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">);</span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">allocate</span><span class="special">(</span><span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">pointer</span><span class="special">);</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">deallocate</span><span class="special">(</span><span class="identifier">pointer</span> <span class="identifier">ptr</span><span class="special">,</span> <span class="identifier">size_type</span> <span class="identifier">n</span><span class="special">);</span>
<span class="keyword">static</span> <span class="identifier">pointer</span> <span class="identifier">allocate</span><span class="special">();</span>
<span class="keyword">static</span> <span class="keyword">void</span> <span class="identifier">deallocate</span><span class="special">(</span><span class="identifier">pointer</span> <span class="identifier">ptr</span><span class="special">);</span>
<span class="special">};</span>
</pre>
<p>
<span class="bold"><strong>Template Parameters</strong></span>
</p>
<p>
<span class="emphasis"><em>T</em></span> The first template parameter is the type of object
to allocate/deallocate.
</p>
<p>
<span class="emphasis"><em>UserAllocator</em></span> Defines the method that the underlying
Pool will use to allocate memory from the system. See User Allocators
for details.
</p>
<p>
<span class="bold"><strong>Example:</strong></span>
</p>
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">func</span><span class="special">()</span>
<span class="special">{</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">pool_allocator</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">v</span><span class="special">;</span>
<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="number">10000</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">13</span><span class="special">);</span>
<span class="special">}</span> <span class="comment">// Exiting the function does NOT free the system memory allocated by the pool allocator.</span>
<span class="comment">// You must call</span>
<span class="comment">// boost::singleton_pool&lt;boost::pool_allocator_tag, sizeof(int)&gt;::release_memory();</span>
<span class="comment">// in order to force freeing the system memory.</span>
</pre>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="testing.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pooling.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,104 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Introduction</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../pool.html" title="Introduction and Overview">
<link rel="prev" href="conventions.html" title="Documentation Naming and Formatting Conventions">
<link rel="next" href="usage.html" title="How do I use Pool?">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="conventions.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="usage.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.pool.introduction"></a><a class="link" href="introduction.html" title="Introduction">Introduction</a>
</h3></div></div></div>
<h6>
<a name="boost_pool.pool.introduction.h0"></a>
<span><a name="boost_pool.pool.introduction.what_is_pool_"></a></span><a class="link" href="introduction.html#boost_pool.pool.introduction.what_is_pool_">What
is Pool?</a>
</h6>
<p>
Pool allocation is a memory allocation scheme that is very fast, but limited
in its usage. For more information on pool allocation (also called <span class="emphasis"><em>simple
segregated storage</em></span>, see <a class="link" href="pooling.html#boost_pool.pool.pooling.concepts" title="Basic ideas behind pooling">concepts</a>
concepts and <a class="link" href="pooling.html#boost_pool.pool.pooling.simple" title="Simple Segregated Storage">Simple Segregated
Storage</a>).
</p>
<h6>
<a name="boost_pool.pool.introduction.h1"></a>
<span><a name="boost_pool.pool.introduction.why_should_i_use_pool_"></a></span><a class="link" href="introduction.html#boost_pool.pool.introduction.why_should_i_use_pool_">Why
should I use Pool?</a>
</h6>
<p>
Using Pools gives you more control over how memory is used in your program.
For example, you could have a situation where you want to allocate a bunch
of small objects at one point, and then reach a point in your program where
none of them are needed any more. Using pool interfaces, you can choose to
run their destructors or just drop them off into oblivion; the pool interface
will guarantee that there are no system memory leaks.
</p>
<h6>
<a name="boost_pool.pool.introduction.h2"></a>
<span><a name="boost_pool.pool.introduction.when_should_i_use_pool_"></a></span><a class="link" href="introduction.html#boost_pool.pool.introduction.when_should_i_use_pool_">When should
I use Pool?</a>
</h6>
<p>
Pools are generally used when there is a lot of allocation and deallocation
of small objects. Another common usage is the situation above, where many
objects may be dropped out of memory.
</p>
<p>
In general, use Pools when you need a more efficient way to do unusual memory
control.
</p>
<h6>
<a name="boost_pool.pool.introduction.h3"></a>
<span><a name="boost_pool.pool.introduction.which_pool_allocator_should_i_use_"></a></span><a class="link" href="introduction.html#boost_pool.pool.introduction.which_pool_allocator_should_i_use_">Which
pool allocator should I use?</a>
</h6>
<p>
<code class="computeroutput"><span class="identifier">pool_allocator</span></code> is a more
general-purpose solution, geared towards efficiently servicing requests for
any number of contiguous chunks.
</p>
<p>
<code class="computeroutput"><span class="identifier">fast_pool_allocator</span></code> is also
a general-purpose solution but is geared towards efficiently servicing requests
for one chunk at a time; it will work for contiguous chunks, but not as well
as pool_allocator.
</p>
<p>
If you are seriously concerned about performance, use <code class="computeroutput"><span class="identifier">fast_pool_allocator</span></code>
when dealing with containers such as <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span></code>,
and use <code class="computeroutput"><span class="identifier">pool_allocator</span></code> when
dealing with containers such as <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span></code>.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="conventions.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="usage.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,51 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Building the Test Programs</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../pool.html" title="Introduction and Overview">
<link rel="prev" href="installation.html" title="Installation">
<link rel="next" href="interfaces.html" title="Boost Pool Interfaces - What interfaces are provided and when to use each one.">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="installation.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="interfaces.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.pool.testing"></a><a class="link" href="testing.html" title="Building the Test Programs">Building the Test Programs</a>
</h3></div></div></div>
<p>
A jamfile.v2 is provided which can be run is the usual way, for example:
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">boost</span><span class="special">\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">pool</span><span class="special">\</span><span class="identifier">test</span><span class="special">&gt;</span> <span class="identifier">bjam</span> <span class="special">-</span><span class="identifier">a</span> <span class="special">&gt;</span><span class="identifier">pool_test</span><span class="special">.</span><span class="identifier">log</span></pre>
<p>
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="installation.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="interfaces.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,73 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>How do I use Pool?</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Pool">
<link rel="up" href="../pool.html" title="Introduction and Overview">
<link rel="prev" href="introduction.html" title="Introduction">
<link rel="next" href="installation.html" title="Installation">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="introduction.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="installation.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_pool.pool.usage"></a><a class="link" href="usage.html" title="How do I use Pool?">How do I use Pool?</a>
</h3></div></div></div>
<p>
See the <a class="link" href="interfaces.html" title="Boost Pool Interfaces - What interfaces are provided and when to use each one.">Pool Interfaces</a>
section that covers the different Pool interfaces supplied by this library.
</p>
<h6>
<a name="boost_pool.pool.usage.h0"></a>
<span><a name="boost_pool.pool.usage.library_structure_and_dependencies"></a></span><a class="link" href="usage.html#boost_pool.pool.usage.library_structure_and_dependencies">Library
Structure and Dependencies</a>
</h6>
<p>
Forward declarations of all the exposed symbols for this library are in the
header made inscope by <code class="computeroutput"><span class="preprocessor">#include</span>
<span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">pool</span><span class="special">/</span><span class="identifier">poolfwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>.
</p>
<p>
The library may use macros, which will be prefixed with <code class="computeroutput"><span class="identifier">BOOST_POOL_</span></code>.
The exception to this rule are the include file guards, which (for file
<code class="computeroutput"><span class="identifier">xxx</span><span class="special">.</span><span class="identifier">hpp</span></code>) is <code class="computeroutput"><span class="identifier">BOOST_xxx_HPP</span></code>.
</p>
<p>
All exposed symbols defined by the library will be in namespace boost::.
All symbols used only by the implementation will be in namespace boost::details::pool.
</p>
<p>
Every header used only by the implementation is in the subdirectory <code class="computeroutput"><span class="special">/</span><span class="identifier">detail</span><span class="special">/</span></code>.
</p>
<p>
Any header in the library may include any other header in the library or
any system-supplied header at its discretion.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="introduction.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../pool.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="installation.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,55 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Boost.Pool C++ Reference</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Boost.Pool">
<link rel="up" href="index.html" title="Boost.Pool">
<link rel="prev" href="boost_pool/pool/pooling.html" title="Pool in More Depth">
<link rel="next" href="header/boost/pool/object_pool_hpp.html" title="Header &lt;boost/pool/object_pool.hpp&gt;">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost_pool/pool/pooling.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="header/boost/pool/object_pool_hpp.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_pool_c___reference"></a>Boost.Pool C++ Reference</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="header/boost/pool/object_pool_hpp.html">Header &lt;boost/pool/object_pool.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/pool/pool_hpp.html">Header &lt;boost/pool/pool.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/pool/pool_alloc_hpp.html">Header &lt;boost/pool/pool_alloc.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/pool/poolfwd_hpp.html">Header &lt;boost/pool/poolfwd.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="header/boost/pool/simple_segregated_storage_hpp.html">Header &lt;boost/pool/simple_segregated_storage.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
<dt><span class="section"><a href="header/boost/pool/singleton_pool_hpp.html">Header &lt;boost/pool/singleton_pool.hpp&gt;</a></span></dt>
<dd><dl></dl></dd>
</dl></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost_pool/pool/pooling.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="index.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="header/boost/pool/object_pool_hpp.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,46 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Header &lt;boost/pool/object_pool.hpp&gt;</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../index.html" title="Boost.Pool">
<link rel="up" href="../../../boost_pool_c___reference.html" title="Boost.Pool C++ Reference">
<link rel="prev" href="../../../boost_pool_c___reference.html" title="Boost.Pool C++ Reference">
<link rel="next" href="../../../boost/object_pool.html" title="Class template object_pool">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../boost/object_pool.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="header.boost.pool.object_pool_hpp"></a>Header &lt;<a href="../../../../../../../boost/pool/object_pool.hpp" target="_top">boost/pool/object_pool.hpp</a>&gt;</h3></div></div></div>
<p>Provides a template type boost::object_pool&lt;T, UserAllocator&gt; that can be used for fast and efficient memory allocation of objects of type T. It also provides automatic destruction of non-deallocated objects. </p>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> UserAllocator<span class="special">&gt;</span> <span class="keyword">class</span> <a class="link" href="../../../boost/object_pool.html" title="Class template object_pool">object_pool</a><span class="special">;</span>
<span class="special">}</span></pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../boost/object_pool.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,107 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Header &lt;boost/pool/pool_alloc.hpp&gt;</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../index.html" title="Boost.Pool">
<link rel="up" href="../../../boost_pool_c___reference.html" title="Boost.Pool C++ Reference">
<link rel="prev" href="../../../boost/pool.html" title="Class template pool">
<link rel="next" href="../../../boost/pool_allocator_tag.html" title="Struct pool_allocator_tag">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../boost/pool.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../boost/pool_allocator_tag.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="header.boost.pool.pool_alloc_hpp"></a>Header &lt;<a href="../../../../../../../boost/pool/pool_alloc.hpp" target="_top">boost/pool/pool_alloc.hpp</a>&gt;</h3></div></div></div>
<p>C++ Standard Library compatible pool-based allocators. </p>
<p>This header provides two template types - pool_allocator and fast_pool_allocator - that can be used for fast and efficient memory allocation in conjunction with the C++ Standard Library containers.</p>
<p>These types both satisfy the Standard Allocator requirements [20.1.5] and the additional requirements in [20.1.5/4], so they can be used with either Standard or user-supplied containers.</p>
<p>In addition, the fast_pool_allocator also provides an additional allocation and an additional deallocation function:</p>
<div class="informaltable"><table class="table" cellspacing="3" cellpadding="5">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td><span class="bold"><strong>Expression</strong></span></td>
<td><span class="bold"><strong>Return Type</strong></span></td>
<td><span class="bold"><strong>Semantic Equivalence</strong></span></td>
<td><span class="bold"><strong></strong></span></td>
</tr>
<tr>
<td><code class="computeroutput">PoolAlloc::allocate()</code></td>
<td><code class="computeroutput">T *</code></td>
<td>
<code class="computeroutput">PoolAlloc::allocate(1)</code> </td>
<td class="auto-generated">&#160;</td>
</tr>
<tr>
<td><code class="computeroutput">PoolAlloc::deallocate(p)</code></td>
<td>void</td>
<td>
<code class="computeroutput">PoolAlloc::deallocate(p, 1)</code> </td>
<td class="auto-generated">&#160;</td>
</tr>
</tbody>
</table></div>
<p>
</p>
<p>The typedef user_allocator publishes the value of the UserAllocator template parameter.</p>
<p><span class="bold"><strong>Notes</strong></span></p>
<p>If the allocation functions run out of memory, they will throw <code class="computeroutput">std::bad_alloc</code>.</p>
<p>The underlying Pool type used by the allocators is accessible through the Singleton Pool Interface. The identifying tag used for pool_allocator is pool_allocator_tag, and the tag used for fast_pool_allocator is fast_pool_allocator_tag. All template parameters of the allocators (including implementation-specific ones) determine the type of the underlying Pool, with the exception of the first parameter T, whose size is used instead.</p>
<p>Since the size of T is used to determine the type of the underlying Pool, each allocator for different types of the same size will share the same underlying pool. The tag class prevents pools from being shared between pool_allocator and fast_pool_allocator. For example, on a system where <code class="computeroutput">sizeof(int) == sizeof(void *)</code>, <code class="computeroutput">pool_allocator&lt;int&gt;</code> and <code class="computeroutput">pool_allocator&lt;void *&gt;</code> will both allocate/deallocate from/to the same pool.</p>
<p>If there is only one thread running before main() starts and after main() ends, then both allocators are completely thread-safe.</p>
<p><span class="bold"><strong>Compiler and STL Notes</strong></span></p>
<p>A number of common STL libraries contain bugs in their using of allocators. Specifically, they pass null pointers to the deallocate function, which is explicitly forbidden by the Standard [20.1.5 Table 32]. PoolAlloc will work around these libraries if it detects them; currently, workarounds are in place for: Borland C++ (Builder and command-line compiler) with default (RogueWave) library, ver. 5 and earlier, STLport (with any compiler), ver. 4.0 and earlier. </p>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">struct</span> <a class="link" href="../../../boost/pool_allocator_tag.html" title="Struct pool_allocator_tag">pool_allocator_tag</a><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> UserAllocator<span class="special">,</span> <span class="keyword">typename</span> Mutex<span class="special">,</span>
<span class="keyword">unsigned</span> NextSize<span class="special">,</span> <span class="keyword">unsigned</span> MaxSize<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="../../../boost/pool_allocator.html" title="Class template pool_allocator">pool_allocator</a><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> UserAllocator<span class="special">,</span> <span class="keyword">typename</span> Mutex<span class="special">,</span> <span class="keyword">unsigned</span> NextSize<span class="special">,</span>
<span class="keyword">unsigned</span> MaxSize<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="../../../boost/pool_allocator_void__UserAllocator__M_id378014.html" title="Class template pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;">pool_allocator</a><span class="special">&lt;</span><span class="keyword">void</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span><span class="special">&gt;</span><span class="special">;</span>
<span class="keyword">struct</span> <a class="link" href="../../../boost/fast_pool_allocator_tag.html" title="Struct fast_pool_allocator_tag">fast_pool_allocator_tag</a><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> UserAllocator<span class="special">,</span> <span class="keyword">typename</span> Mutex<span class="special">,</span>
<span class="keyword">unsigned</span> NextSize<span class="special">,</span> <span class="keyword">unsigned</span> MaxSize<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="../../../boost/fast_pool_allocator.html" title="Class template fast_pool_allocator">fast_pool_allocator</a><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> UserAllocator<span class="special">,</span> <span class="keyword">typename</span> Mutex<span class="special">,</span> <span class="keyword">unsigned</span> NextSize<span class="special">,</span>
<span class="keyword">unsigned</span> MaxSize<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="../../../boost/fast_pool_allocator_void__UserAllocat_id378528.html" title="Class template fast_pool_allocator&lt;void, UserAllocator, Mutex, NextSize, MaxSize&gt;">fast_pool_allocator</a><span class="special">&lt;</span><span class="keyword">void</span><span class="special">,</span> <span class="identifier">UserAllocator</span><span class="special">,</span> <span class="identifier">Mutex</span><span class="special">,</span> <span class="identifier">NextSize</span><span class="special">,</span> <span class="identifier">MaxSize</span><span class="special">&gt;</span><span class="special">;</span>
<span class="special">}</span></pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../boost/pool.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../boost/pool_allocator_tag.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,49 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Header &lt;boost/pool/pool.hpp&gt;</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../index.html" title="Boost.Pool">
<link rel="up" href="../../../boost_pool_c___reference.html" title="Boost.Pool C++ Reference">
<link rel="prev" href="../../../boost/object_pool.html" title="Class template object_pool">
<link rel="next" href="../../../boost/default_user_allocator_new_delete.html" title="Struct default_user_allocator_new_delete">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../boost/object_pool.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../boost/default_user_allocator_new_delete.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="header.boost.pool.pool_hpp"></a>Header &lt;<a href="../../../../../../../boost/pool/pool.hpp" target="_top">boost/pool/pool.hpp</a>&gt;</h3></div></div></div>
<p>Provides class pool: a fast memory allocator that guarantees proper alignment of all allocated chunks, and which extends and generalizes the framework provided by the simple segregated storage solution. Also provides two UserAllocator classes which can be used in conjuction with pool. </p>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">struct</span> <a class="link" href="../../../boost/default_user_allocator_new_delete.html" title="Struct default_user_allocator_new_delete">default_user_allocator_new_delete</a><span class="special">;</span>
<span class="keyword">struct</span> <a class="link" href="../../../boost/default_user_allocator_malloc_free.html" title="Struct default_user_allocator_malloc_free">default_user_allocator_malloc_free</a><span class="special">;</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> UserAllocator<span class="special">&gt;</span> <span class="keyword">class</span> <a class="link" href="../../../boost/pool.html" title="Class template pool">pool</a><span class="special">;</span>
<span class="special">}</span></pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../boost/object_pool.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../boost/default_user_allocator_new_delete.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,43 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Header &lt;boost/pool/poolfwd.hpp&gt;</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../index.html" title="Boost.Pool">
<link rel="up" href="../../../boost_pool_c___reference.html" title="Boost.Pool C++ Reference">
<link rel="prev" href="../../../boost/fast_pool_allocator_void__UserAllocat_id378528/rebind.html" title="Struct template rebind">
<link rel="next" href="simple_segregated_storage_hpp.html" title="Header &lt;boost/pool/simple_segregated_storage.hpp&gt;">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../boost/fast_pool_allocator_void__UserAllocat_id378528/rebind.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="simple_segregated_storage_hpp.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="header.boost.pool.poolfwd_hpp"></a>Header &lt;<a href="../../../../../../../boost/pool/poolfwd.hpp" target="_top">boost/pool/poolfwd.hpp</a>&gt;</h3></div></div></div>
<p>Forward declarations of all public (non-implemention) classes. </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../boost/fast_pool_allocator_void__UserAllocat_id378528/rebind.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="simple_segregated_storage_hpp.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,50 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Header &lt;boost/pool/simple_segregated_storage.hpp&gt;</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../index.html" title="Boost.Pool">
<link rel="up" href="../../../boost_pool_c___reference.html" title="Boost.Pool C++ Reference">
<link rel="prev" href="poolfwd_hpp.html" title="Header &lt;boost/pool/poolfwd.hpp&gt;">
<link rel="next" href="../../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="poolfwd_hpp.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../boost/simple_segregated_storage.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="header.boost.pool.simple_segregated_storage_hpp"></a>Header &lt;<a href="../../../../../../../boost/pool/simple_segregated_storage.hpp" target="_top">boost/pool/simple_segregated_storage.hpp</a>&gt;</h3></div></div></div>
<p>Simple Segregated Storage. </p>
<p>A simple segregated storage implementation: simple segregated storage is the basic idea behind the Boost Pool library. Simple segregated storage is the simplest, and probably the fastest, memory allocation/deallocation algorithm. It begins by partitioning a memory block into fixed-size chunks. Where the block comes from is not important until implementation time. A Pool is some object that uses Simple Segregated Storage in this fashion. </p>
<pre class="synopsis">
<a class="link" href="../../../BOOST_POOL_VALIDATE_INTERNALS.html" title="Macro BOOST_POOL_VALIDATE_INTERNALS">BOOST_POOL_VALIDATE_INTERNALS</a></pre>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SizeType<span class="special">&gt;</span> <span class="keyword">class</span> <a class="link" href="../../../boost/simple_segregated_storage.html" title="Class template simple_segregated_storage">simple_segregated_storage</a><span class="special">;</span>
<span class="special">}</span></pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="poolfwd_hpp.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../boost/simple_segregated_storage.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,49 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Header &lt;boost/pool/singleton_pool.hpp&gt;</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../index.html" title="Boost.Pool">
<link rel="up" href="../../../boost_pool_c___reference.html" title="Boost.Pool C++ Reference">
<link rel="prev" href="../../../BOOST_POOL_VALIDATE_INTERNALS.html" title="Macro BOOST_POOL_VALIDATE_INTERNALS">
<link rel="next" href="../../../boost/singleton_pool.html" title="Class template singleton_pool">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../BOOST_POOL_VALIDATE_INTERNALS.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../boost/singleton_pool.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="header.boost.pool.singleton_pool_hpp"></a>Header &lt;<a href="../../../../../../../boost/pool/singleton_pool.hpp" target="_top">boost/pool/singleton_pool.hpp</a>&gt;</h3></div></div></div>
<p>The <code class="computeroutput">singleton_pool</code> class allows other pool interfaces for types of the same size to share the same underlying pool. </p>
<p>Header singleton_pool.hpp provides a template class <code class="computeroutput">singleton_pool</code>, which provides access to a pool as a singleton object. </p>
<pre class="synopsis"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Tag<span class="special">,</span> <span class="keyword">unsigned</span> RequestedSize<span class="special">,</span> <span class="keyword">typename</span> UserAllocator<span class="special">,</span>
<span class="keyword">typename</span> Mutex<span class="special">,</span> <span class="keyword">unsigned</span> NextSize<span class="special">,</span> <span class="keyword">unsigned</span> MaxSize<span class="special">&gt;</span>
<span class="keyword">class</span> <a class="link" href="../../../boost/singleton_pool.html" title="Class template singleton_pool">singleton_pool</a><span class="special">;</span>
<span class="special">}</span></pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2000-2006 Stephen Cleary<br>Copyright &#169; 2011 Paul A. Bristow<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../../BOOST_POOL_VALIDATE_INTERNALS.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_pool_c___reference.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../boost/singleton_pool.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>

View File

@@ -0,0 +1,93 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Boost.Pool</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Boost.Pool">
<link rel="next" href="boost_pool/pool.html" title="Introduction and Overview">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav"><a accesskey="n" href="boost_pool/pool.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div>
<div class="article">
<div class="titlepage">
<div>
<div><h2 class="title">
<a name="boost_pool"></a>Boost.Pool</h2></div>
<div><div class="authorgroup"><div class="author"><h3 class="author">
<span class="firstname">Stephen</span> <span class="surname">Cleary</span>
</h3></div></div></div>
<div><p class="copyright">Copyright &#169; 2000-2006 Stephen Cleary</p></div>
<div><p class="copyright">Copyright &#169; 2011 Paul A. Bristow</p></div>
<div><div class="legalnotice">
<a name="boost_pool.legal"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></div>
</div>
<hr>
</div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
<dt><span class="section"><a href="boost_pool/pool.html">Introduction and Overview</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="boost_pool/pool/conventions.html">Documentation Naming and
Formatting Conventions</a></span></dt>
<dt><span class="section"><a href="boost_pool/pool/introduction.html">Introduction</a></span></dt>
<dt><span class="section"><a href="boost_pool/pool/usage.html">How do I use Pool?</a></span></dt>
<dt><span class="section"><a href="boost_pool/pool/installation.html">Installation</a></span></dt>
<dt><span class="section"><a href="boost_pool/pool/testing.html">Building the Test Programs</a></span></dt>
<dt><span class="section"><a href="boost_pool/pool/interfaces.html">Boost Pool Interfaces - What
interfaces are provided and when to use each one.</a></span></dt>
<dt><span class="section"><a href="boost_pool/pool/pooling.html">Pool in More Depth</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="boost_pool_c___reference.html">Boost.Pool C++ Reference</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="header/boost/pool/object_pool_hpp.html">Header &lt;boost/pool/object_pool.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="header/boost/pool/pool_hpp.html">Header &lt;boost/pool/pool.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="header/boost/pool/pool_alloc_hpp.html">Header &lt;boost/pool/pool_alloc.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="header/boost/pool/poolfwd_hpp.html">Header &lt;boost/pool/poolfwd.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="header/boost/pool/simple_segregated_storage_hpp.html">Header &lt;boost/pool/simple_segregated_storage.hpp&gt;</a></span></dt>
<dt><span class="section"><a href="header/boost/pool/singleton_pool_hpp.html">Header &lt;boost/pool/singleton_pool.hpp&gt;</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="boost_pool/appendices.html">Appendices</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="boost_pool/appendices/history.html">Appendix A: History</a></span></dt>
<dt><span class="section"><a href="boost_pool/appendices/faq.html">Appendix B: FAQ</a></span></dt>
<dt><span class="section"><a href="boost_pool/appendices/acknowledgements.html">Appendix C: Acknowledgements</a></span></dt>
<dt><span class="section"><a href="boost_pool/appendices/tests.html">Appendix D: Tests</a></span></dt>
<dt><span class="section"><a href="boost_pool/appendices/tickets.html">Appendix E: Tickets</a></span></dt>
<dt><span class="section"><a href="boost_pool/appendices/implementations.html">Appendix F: Other
Implementations</a></span></dt>
<dt><span class="section"><a href="boost_pool/appendices/references.html">Appendix G: References</a></span></dt>
<dt><span class="section"><a href="boost_pool/appendices/todo.html">Appendix H: Future plans</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="boost_pool/indexes.html">Indexes</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="boost_pool/indexes/s01.html">Function Index</a></span></dt>
<dt><span class="section"><a href="boost_pool/indexes/s02.html">Class Index</a></span></dt>
<dt><span class="section"><a href="boost_pool/indexes/s03.html">Typedef Index</a></span></dt>
<dt><span class="section"><a href="boost_pool/indexes/s04.html">Index</a></span></dt>
</dl></dd>
</dl>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: December 15, 2011 at 11:24:47 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<div class="spirit-nav"><a accesskey="n" href="boost_pool/pool.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a></div>
</body>
</html>