• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Appendix F: Other Implementations</title>
5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../index.html" title="Boost.Pool">
8<link rel="up" href="../appendices.html" title="Appendices">
9<link rel="prev" href="tickets.html" title="Appendix E: Tickets">
10<link rel="next" href="references.html" title="Appendix G: References">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<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>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h3 class="title">
27<a name="boost_pool.appendices.implementations"></a><a class="link" href="implementations.html" title="Appendix F: Other Implementations">Appendix F: Other
28      Implementations</a>
29</h3></div></div></div>
30<p>
31        Pool allocators are found in many programming languages, and in many variations.
32        The beginnings of many implementations may be found in common programming
33        literature; some of these are given below. Note that none of these are complete
34        implementations of a Pool; most of these leave some aspects of a Pool as
35        a user exercise. However, in each case, even though some aspects are missing,
36        these examples use the same underlying concept of a Simple Segregated Storage
37        described in this document.
38      </p>
39<div class="orderedlist"><ol class="orderedlist" type="1">
40<li class="listitem">
41            <span class="emphasis"><em>The C++ Programming Language</em></span>, 3rd ed., by Bjarne
42            Stroustrup, Section 19.4.2. Missing aspects:
43            <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
44<li class="listitem">
45                  Not portable.
46                </li>
47<li class="listitem">
48                  Cannot handle allocations of arbitrary numbers of objects (this
49                  was left as an exercise).
50                </li>
51<li class="listitem">
52                  Not thread-safe.
53                </li>
54<li class="listitem">
55                  Suffers from the static initialization problem.
56                </li>
57</ul></div>
58          </li>
59<li class="listitem">
60            <span class="emphasis"><em>MicroC/OS-II: The Real-Time Kernel</em></span>, by Jean J. Labrosse,
61            Chapter 7 and Appendix B.04.
62            <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
63<li class="listitem">
64                  An example of the Simple Segregated Storage scheme at work in the
65                  internals of an actual OS.
66                </li>
67<li class="listitem">
68                  Missing aspects:
69                </li>
70<li class="listitem">
71                  Not portable (though this is OK, since it's part of its own OS).
72                </li>
73<li class="listitem">
74                  Cannot handle allocations of arbitrary numbers of blocks (which
75                  is also OK, since this feature is not needed).
76                </li>
77<li class="listitem">
78                  Requires non-intuitive user code to create and destroy the Pool.
79                </li>
80</ul></div>
81          </li>
82<li class="listitem">
83            <span class="emphasis"><em>Efficient C++: Performance Programming Techniques</em></span>,
84            by Dov Bulka and David Mayhew, Chapters 6 and 7.
85            <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
86<li class="listitem">
87                  This is a good example of iteratively developing a Pool solutio.
88                </li>
89<li class="listitem">
90                  however, their premise (that the system-supplied allocation mechanism
91                  is hopelessly inefficient) is flawed on every system I've tested
92                  on.
93                </li>
94<li class="listitem">
95                  Run their timings on your system before you accept their conclusions.
96                </li>
97<li class="listitem">
98                  Missing aspect: Requires non-intuitive user code to create and
99                  destroy the Pool.
100                </li>
101</ul></div>
102          </li>
103<li class="listitem">
104            <span class="emphasis"><em>Advanced C++: Programming Styles and Idioms</em></span>, by
105            James O. Coplien, Section 3.6.
106            <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
107<li class="listitem">
108                  Has examples of both static and dynamic pooling, but missing aspects:
109                </li>
110<li class="listitem">
111                  Not thread-safe.
112                </li>
113<li class="listitem">
114                  The static pooling example is not portable.
115                </li>
116</ul></div>
117          </li>
118</ol></div>
119</div>
120<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
121<td align="left"></td>
122<td align="right"><div class="copyright-footer">Copyright © 2000-2006 Stephen Cleary<br>Copyright © 2011 Paul A. Bristow<p>
123        Distributed under the Boost Software License, Version 1.0. (See accompanying
124        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>)
125      </p>
126</div></td>
127</tr></table>
128<hr>
129<div class="spirit-nav">
130<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>
131</div>
132</body>
133</html>
134