|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54572 - in sandbox/monotonic/libs/monotonic/doc: . html html/images html/index html/monotonic
From: christian.schladetsch_at_[hidden]
Date: 2009-07-01 20:46:24
Author: cschladetsch
Date: 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
New Revision: 54572
URL: http://svn.boost.org/trac/boost/changeset/54572
Log:
added documentation
Added:
sandbox/monotonic/libs/monotonic/doc/Jamfile.v2 (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/containers.xml (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/design.xml (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/faq.xml (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/
sandbox/monotonic/libs/monotonic/doc/html/doc_HTML.manifest (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/
sandbox/monotonic/libs/monotonic/doc/html/images/alert.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/blank.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/boost.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/caution.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/draft.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/home.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/important.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/next.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/next_disabled.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/note.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/prev.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/prev_disabled.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/smiley.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/tip.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/toc-blank.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/toc-minus.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/toc-plus.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/up.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/up_disabled.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/images/warning.png (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/index/
sandbox/monotonic/libs/monotonic/doc/html/index.html (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/index/s04.html (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/index/s05.html (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/monotonic/
sandbox/monotonic/libs/monotonic/doc/html/monotonic/containers.html (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/monotonic/tests.html (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/html/monotonic/tutorial.html (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/index_old_dont_use.html
- copied unchanged from r54546, /sandbox/monotonic/libs/monotonic/doc/index.html
sandbox/monotonic/libs/monotonic/doc/introduction.xml (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/monotonic.xml (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/rationale.xml (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/tests.xml (contents, props changed)
sandbox/monotonic/libs/monotonic/doc/tutorial.xml (contents, props changed)
Removed:
sandbox/monotonic/libs/monotonic/doc/index.html
Added: sandbox/monotonic/libs/monotonic/doc/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/Jamfile.v2 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,10 @@
+project boost/doc ;
+import boostbook : boostbook ;
+
+boostbook doc
+ :
+ monotonic.xml
+ :
+ <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
+ ;
+
Added: sandbox/monotonic/libs/monotonic/doc/containers.xml
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/containers.xml 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<section last-revision="$Date:$" id="monotonic.containers">
+ <title>Heterogenous Containers</title>
+
+ <using-namespace name="boost"/>
+ <using-namespace name="boost::monotonic"/>
+
+ <section>
+ <title>Overview</title>
+ <para>This tutorial demonstrates the use of the <emphasis>montonic containers</emphasis> provided in the Boost.Monotonic library.
+ </para>
+</section>
+</section>
Added: sandbox/monotonic/libs/monotonic/doc/design.xml
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/design.xml 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<section last-revision="$Date:$">
+ <title>Design Overview</title>
+
+ <using-namespace name="boost"/>
+ <using-namespace name="boost::cloneable"/>
+
+ <section>
+ <title>Class Hierachy</title>
+ </section>
+ <section>
+ <title>Abstract Allocator</title>
+ </section>
+ </section>
Added: sandbox/monotonic/libs/monotonic/doc/faq.xml
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/faq.xml 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<section last-revision="$Date:$">
+ <title>Frequently Asked Questions</title>
+
+ <qandaset>
+ <qandaentry>
+ <question>
+ <para>Question?
+ </para>
+ </question>
+ <answer>
+ <para>Answer.
+ </para>
+ </answer>
+ </qandaentry>
+ </qandaset>
+</section>
Added: sandbox/monotonic/libs/monotonic/doc/html/doc_HTML.manifest
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/html/doc_HTML.manifest 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,6 @@
+index.html
+monotonic/tutorial.html
+monotonic/containers.html
+index/s04.html
+index/s05.html
+monotonic/tests.html
Added: sandbox/monotonic/libs/monotonic/doc/html/images/alert.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/blank.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/boost.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/caution.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/draft.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/home.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/important.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/next.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/next_disabled.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/note.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/prev.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/prev_disabled.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/smiley.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/tip.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/toc-blank.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/toc-minus.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/toc-plus.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/up.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/up_disabled.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/images/warning.png
==============================================================================
Binary file. No diff available.
Added: sandbox/monotonic/libs/monotonic/doc/html/index.html
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/html/index.html 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,85 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Chapter 1. Boost.Monotonic</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="index.html" title="Chapter 1. Boost.Monotonic">
+<link rel="next" href="monotonic/tutorial.html" title="Tutorial">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="monotonic/tutorial.html"><img src="../../doc/html/images/next.png" alt="Next"></a></div>
+<div class="chapter" title="Chapter 1. Boost.Monotonic">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="monotonic"></a>Chapter 1. Boost.Monotonic</h2></div>
+<div><div class="author">
+<h3 class="author">
+<span class="firstname">Christian</span> <span class="surname">Schladetsch</span>
+</h3>
+<code class="email"><<a class="email" href="mailto:christian.schladetsch_at_[hidden]">christian.schladetsch_at_[hidden]</a>></code>
+</div></div>
+<div><p class="copyright">Copyright © 2009 Christian Schladetsch</p></div>
+<div><div class="legalnotice" title="Legal Notice">
+<a name="id648141"></a><p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> or copy at http://www.boost.org/LICENSE_1_0.txt)</p>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section">Introduction</span></dt>
+<dt><span class="section">Tutorial</span></dt>
+<dd><dl>
+<dt><span class="section">Overview</span></dt>
+<dt><span class="section">Basic Usage</span></dt>
+<dt><span class="section">Using Multiple Containers</span></dt>
+<dt><span class="section">Notes</span></dt>
+</dl></dd>
+<dt><span class="section">Heterogenous Containers</span></dt>
+<dd><dl><dt><span class="section">Overview</span></dt></dl></dd>
+<dt><span class="section">Frequently Asked Questions</span></dt>
+<dt><span class="section">Design Overview</span></dt>
+<dd><dl>
+<dt><span class="section">Class Hierachy</span></dt>
+<dt><span class="section">Abstract Allocator</span></dt>
+</dl></dd>
+<dt><span class="section">Testsuite</span></dt>
+<dd><dl><dt><span class="section">Acceptance tests</span></dt></dl></dd>
+</dl>
+</div>
+<div class="section" title="Introduction">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="id648161"></a>Introduction</h2></div></div></div>
+<p>
+The <span class="emphasis"><em>Boost.Monotonic</em></span> library provides storage, allocation and container types for use in high-performance and real-time applications.
+</p>
+<p>
+The library provides a means for allocation to come from the stack, or the heap, or a combination of both the stack and the heap. Allocation is fast, because de-allocation does nothing. As such, the amount of storage used by a <span class="emphasis"><em>monotonic allocator</em></span> can only ever increase - hence the name of the library.
+</p>
+<p>
+ Allocation can be <span class="emphasis"><em>regionalised</em></span> by application of user-supplied 'tag types' to specify a logical storage region. A second tag may be used to specify the <span class="emphasis"><em>access type</em></span> for the region - which can be either global, guarded by a mutex, or using thread-local storage.
+</p>
+<p>
+Boost.Monotonic is generally used where performace matters most. By making deallocation a no-op, allocation of memory resources is extremely fast. In genreal, the programmer is required to release storage used at an appropriate time, however local scoping systems are provided by the library for the most common use cases.
+</p>
+</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: June , 2009 at </small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="monotonic/tutorial.html"><img src="../../doc/html/images/next.png" alt="Next"></a></div>
+</body>
+</html>
Added: sandbox/monotonic/libs/monotonic/doc/html/index/s04.html
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/html/index/s04.html 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,64 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Frequently Asked Questions</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter 1. Boost.Monotonic">
+<link rel="up" href="../index.html" title="Chapter 1. Boost.Monotonic">
+<link rel="prev" href="../monotonic/containers.html" title="Heterogenous Containers">
+<link rel="next" href="s05.html" title="Design 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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../monotonic/containers.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="s05.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Frequently Asked Questions">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="id648286"></a>Frequently Asked Questions</h2></div></div></div>
+<div class="qandaset" title="Frequently Asked Questions">
+<a name="id648293"></a><dl><dt>1. <a href="s04.html#id648296">Question?
+ </a>
+</dt></dl>
+<table border="0" width="100%" summary="Q and A Set">
+<col align="left" width="1%">
+<col>
+<tbody>
+<tr class="question" title="1.">
+<td align="left" valign="top">
+<a name="id648296"></a><a name="id648298"></a><p><b>1.</b></p>
+</td>
+<td align="left" valign="top"><p>Question?
+ </p></td>
+</tr>
+<tr class="answer">
+<td align="left" valign="top"></td>
+<td align="left" valign="top"><p>Answer.
+ </p></td>
+</tr>
+</tbody>
+</table>
+</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: , at </small></p></td>
+<td align="right"><div class="copyright-footer">Copyright © 2009 Christian Schladetsch<p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> or copy at http://www.boost.org/LICENSE_1_0.txt)</p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../monotonic/containers.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="s05.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/monotonic/libs/monotonic/doc/html/index/s05.html
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/html/index/s05.html 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,49 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Design Overview</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter 1. Boost.Monotonic">
+<link rel="up" href="../index.html" title="Chapter 1. Boost.Monotonic">
+<link rel="prev" href="s04.html" title="Frequently Asked Questions">
+<link rel="next" href="../monotonic/tests.html" title="Testsuite">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="s04.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../monotonic/tests.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Design Overview">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="id648316"></a>Design Overview</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Class Hierachy</span></dt>
+<dt><span class="section">Abstract Allocator</span></dt>
+</dl></div>
+<div class="section" title="Class Hierachy"><div class="titlepage"><div><div><h3 class="title">
+<a name="id648323"></a>Class Hierachy</h3></div></div></div></div>
+<div class="section" title="Abstract Allocator"><div class="titlepage"><div><div><h3 class="title">
+<a name="id648330"></a>Abstract Allocator</h3></div></div></div></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: , at </small></p></td>
+<td align="right"><div class="copyright-footer">Copyright © 2009 Christian Schladetsch<p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> or copy at http://www.boost.org/LICENSE_1_0.txt)</p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="s04.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../monotonic/tests.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/monotonic/libs/monotonic/doc/html/monotonic/containers.html
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/html/monotonic/containers.html 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,48 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Heterogenous Containers</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter 1. Boost.Monotonic">
+<link rel="up" href="../index.html" title="Chapter 1. Boost.Monotonic">
+<link rel="prev" href="tutorial.html" title="Tutorial">
+<link rel="next" href="../index/s04.html" title="Frequently Asked Questions">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tutorial.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../index/s04.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Heterogenous Containers">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="monotonic.containers"></a>Heterogenous Containers</h2></div></div></div>
+<div class="toc"><dl><dt><span class="section">Overview</span></dt></dl></div>
+<div class="section" title="Overview">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="id648270"></a>Overview</h3></div></div></div>
+<p>This tutorial demonstrates the use of the <span class="emphasis"><em>montonic containers</em></span> provided in the Boost.Monotonic library.
+ </p>
+</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: , at </small></p></td>
+<td align="right"><div class="copyright-footer">Copyright © 2009 Christian Schladetsch<p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> or copy at http://www.boost.org/LICENSE_1_0.txt)</p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tutorial.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../index/s04.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/monotonic/libs/monotonic/doc/html/monotonic/tests.html
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/html/monotonic/tests.html 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,104 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Testsuite</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter 1. Boost.Monotonic">
+<link rel="up" href="../index.html" title="Chapter 1. Boost.Monotonic">
+<link rel="prev" href="../index/s05.html" title="Design 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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index/s05.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a>
+</div>
+<div class="section" title="Testsuite">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="monotonic.tests"></a>Testsuite</h2></div></div></div>
+<div class="toc"><dl><dt><span class="section">Acceptance tests</span></dt></dl></div>
+<div class="section" title="Acceptance tests">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="id643976"></a>Acceptance tests</h3></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col width="1in">
+<col>
+</colgroup>
+<thead><tr>
+<th>Test</th>
+<th>Type</th>
+<th>Description</th>
+<th>If failing...</th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>dead_slot_test.cpp</p></td>
+<td><p>run</p></td>
+<td><p>Ensure that calling <code class="computeroutput">connect</code> with a slot
+that has already been disconnected via deletion does not actually
+connect to the slot.</p></td>
+<td> </td>
+</tr>
+<tr>
+<td><p>deletion_test.cpp</p></td>
+<td><p>run</p></td>
+<td><p>Test deletion of slots.</p></td>
+<td> </td>
+</tr>
+<tr>
+<td><p>ordering_test.cpp</p></td>
+<td><p>run</p></td>
+<td><p>Test slot group ordering.</p></td>
+<td> </td>
+</tr>
+<tr>
+<td><p>signal_n_test.cpp</p></td>
+<td><p>run</p></td>
+<td><p>Basic test of signal/slot connections and invocation using the
+<code class="computeroutput">boost::signalN</code> class templates.</p></td>
+<td> </td>
+</tr>
+<tr>
+<td><p>signal_test.cpp</p></td>
+<td><p>run</p></td>
+<td><p>Basic test of signal/slot connections and invocation using the
+<code class="computeroutput">boost::signal</code> class template.</p></td>
+<td><p>The <code class="computeroutput">boost::signal</code> class template may not
+be usable on your compiler. However, the
+<code class="computeroutput">boost::signalN</code> class templates may still be
+usable.</p></td>
+</tr>
+<tr>
+<td><p>trackable_test.cpp</p></td>
+<td><p>run</p></td>
+<td><p>Test automatic lifetime management using
+ <code class="computeroutput">boost::trackable</code> objects.</p></td>
+<td> </td>
+</tr>
+</tbody>
+</table></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 © 2009 Christian Schladetsch<p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> or copy at http://www.boost.org/LICENSE_1_0.txt)</p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index/s05.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>
Added: sandbox/monotonic/libs/monotonic/doc/html/monotonic/tutorial.html
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/html/monotonic/tutorial.html 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,111 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Tutorial</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
+<link rel="home" href="../index.html" title="Chapter 1. Boost.Monotonic">
+<link rel="up" href="../index.html" title="Chapter 1. Boost.Monotonic">
+<link rel="prev" href="../index.html" title="Chapter 1. Boost.Monotonic">
+<link rel="next" href="../cloneable/containers.html" title="Heterogenous Containers">
+</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">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../cloneable/containers.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Tutorial">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="monotonic.tutorial"></a>Tutorial</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Overview</span></dt>
+<dt><span class="section">Basic Usage</span></dt>
+<dt><span class="section">Using Multiple Containers</span></dt>
+<dt><span class="section">Notes</span></dt>
+</dl></div>
+<div class="section" title="Overview">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="id643839"></a>Overview</h3></div></div></div>
+<p>This tutorial progresses through the basic usage of the library, demonstrating how to use a monotonic allocator with STL containers, how to use monotonic storage directly without an allocator, how to use regions and access tags, and finally demonstrates the use of the supplied container library with stack-based local storage.
+</p>
+</div>
+<div class="section" title="Basic Usage">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="id643850"></a>Basic Usage</h3></div></div></div>
+<p>
+The following is a very quick introduction to Boost.Monotonic:
+</p>
+<pre class="programlisting">
+#include <boost/monotonic/allocator.hpp>
+
+using namespace boost;
+
+int main()
+{
+ {
+ std::list<int, monotonic::allocator<int> > list;
+ for (size_t n = 0; n < 1000; ++n)
+ list.push_back(n);
+ }
+ monotonic::static_storage<>::release();
+ return 0;
+}
+</pre>
+<p>
+Here we have created a std::list using a monotonic allocator. While we add new elements to the list in the for-loop, allocation is coming from monotonic storage in the default region with default access. The first 32k of allocation will come from the BSS segment embedded in the application image (the amount of such storage is configurable), then one that local storage is exhausted, later allocation requests will be serviced from the heap. Since de-allocation does nothing in a monotonic allocator, we must manually release the resources once we are finished, as shown above.
+</p>
+<p>
+The above example is clearly trivial, but if you were to benchmark it against using a default std::allocator you will find that monotonic is much faster[1]. This is the main reason for using this library; to provide efficient storage and allocation for temporary containers. We shall now move on to some more interesting examples, including how to use multiple containers that share the same strorage, using regions, using local stack-based storage, and dealing with threading issues.
+</p>
+</div>
+<div class="section" title="Using Multiple Containers">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="id643871"></a>Using Multiple Containers</h3></div></div></div>
+<pre class="programlisting">
+int main()
+{
+ {
+ typedef std::vector<int, monotonic::allocator<int> > Vector;
+ typedef std::map<int, Vector, std::less<int>, monotonic::allocator<Vector> > Map;
+ Map map;
+ for (size_t n = 0; n < 10000; ++n)
+ {
+ map[rand()].push_back(n);
+ }
+ }
+ monotonic::static_storage<>::release();
+ return 0;
+};
+</pre>
+<p>
+ In this admittedly contrived example, we create a map of ints to vectors of ints, which each container using a monotonic allocator. Again, storage will only ever increase, so we must release it after we have finished using it. Again as well, benchmarking the performance of this against other allocation schemes[2] show that monotonic allocation is extremely fast and efficient.
+</p>
+</div>
+<div class="section" title="Notes">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="id643886"></a>Notes</h3></div></div></div>
+[1] See further discussion on efficiency at xxx
+[2] See performance results at yyy
+</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: , at </small></p></td>
+<td align="right"><div class="copyright-footer">Copyright © 2009 Christian Schladetsch<p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> or copy at http://www.boost.org/LICENSE_1_0.txt)</p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../cloneable/containers.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Deleted: sandbox/monotonic/libs/monotonic/doc/index.html
==============================================================================
--- sandbox/monotonic/libs/monotonic/doc/index.html 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
+++ (empty file)
@@ -1,360 +0,0 @@
-<HTML>
-<HEAD>
-<META NAME="GENERATOR" Content="Microsoft Visual Studio 10.0">
-<TITLE></TITLE>
-</HEAD>
-<BODY>
-
-
-
- <div class="document">
- <table class="docinfo" frame="void" rules="none">
- <colgroup>
- <col class="docinfo-name" />
- <col class="docinfo-content" />
- </colgroup>
- <tbody valign="top">
- <tr>
- <th class="docinfo-name">
- Authors:</th>
- <td>
- Christian Schladetsch (christian.schladetsch_at_[hidden])</td>
- </tr>
- <tr>
- <th class="docinfo-name">
- Version:</th>
- <td>
- 0.2a</td>
- </tr>
- <tr class="field">
- <th class="docinfo-name">
- License:</th>
- <td class="field-body">
- Distributed under the Boost Software License, Version 1.0.</td>
- </tr>
- </tbody>
- </table>
- <div id="boost-bloom-filter" class="section">
- <h1>
- Boost.Monotonic</h1>
- <p>
- This proposal uses a custom allocator and a common storage concept to provide
- allocation of objects of different types from the same buffer.
- This buffer can be on the stack, on the heap, or spanning both the stack and the
- heap. The allocation model is designed
- to be optimal in time with also zero space overhead per allocation made.</p>
- <h2 id="Motivation">
- Motivation
- </h2>
- <p>
- Fast allocation is the main motivation for this library. </p>
- <p>
- The reason why boost.monotonic is faster than other allocation systems is that it is not
- a full allocator in the traditional sense. It only provides new storage; it does not de-allocate. Resources are freed when a local storage goes out of scope, or the user calls monotonic::reset_storage() to reset the storage, or monotonic::release_storage()
- to return the allocated buffers back to the OS.
- </p>
- <h2 id="Proposal">
- Quick Example</h2>
- <p>
- The following example uses std::containers with the allocator in this library by
- explicitly declaring the allocator type. An optional and debatable extension to
- the library includes some basic wrapper types around the std::containers that
- simplifies the syntax somewhat.</p>
- <pre>void shared()
-{
- // declare the storage that will be shared by the various containers.
- // storage will use the stack at first, then transparently expand to the heap as needed
- boost::monotonic::storage<> storage;
- {
- std::map<int, int, std::less<int>, boost::monotonic::allocator<int> > map;
- map[1] = 2;
- map[2] = 4;
-
- std::vector<char, boost::monotonic::allocator<char> > vec;
- vec.assign('x', 4);
-
- std::list<char, boost::monotonic::allocator<char> > list;
- std::copy(vec.begin(), vec.end(), std::back_inserter(list));
-
- typedef std::pair<int, int> pair;
- std::set<pair, std::less<pair>, boost::monotonic::allocator<pair> > set;
- std::copy(map.begin(), map.end(), std::inserter(set));
- }
- // all allocations are freed when storage leaves scope
-}
-</pre>
- <h2>
- Proposal
- </h2>
- <p>
- The source code resides in the boost sandbox.</p>
- <p>
- This is a constant-time, STL-compliant allocator and storage system with the following
- properties: </p>
- <ul>
- <li>Space for objects is pre-allocated. This can be on the stack, on the heap, or
- spanning both. </li>
- <li>Objects are initialised only as required. </li>
- <li>De-allocating an object does nothing other than call its destructor iff it has one.</li>
- <li>Object storage is not reclaimed until the underlying storage goes out of scope.
- </li>
- <li>Multiple different containers of any type can share the same storage via
- different allocators.</li>
- <li>Containers on the stack are thread-safe by default.</li>
- <li>monotonic::shared_storage can be used otherwise for multi-threaded applications.</li>
- </ul>
- <p>
- The benefits of using a monotonic::allocator over other allocators are:
- <ul>
- <li>All storage is pre-allocated, similar to a pool </li>
- <li>Storage can be on the stack: <ul>
- <li>Heap is not even used, let alone fragmented </li>
- <li>Cache coherency (and/or spatial locality) is high </li>
- </ul>
- </li>
- <li>Allocations will first exhaust any reserved space on the stack before reverting
- to the heap. This is transparent to users of the allocator, such as containers.</li>
- <li>Allocation is lightening-fast as it only involves advancing a pointer and
- possible alignment.</li>
- <li>Deallocation is even faster as it does absolutely nothing </li>
- <li>Different containers can share the same storage</li>
- </ul>
- <p>There are also limitations: </p>
- <ul>
- <li>Storage grows monotonically: removing objects from a container does not
- de-allocate memory </li>
- </ul>
- <h2 id="Architecture">
- Architecture
- </h2>
- <p>
- The architecture is quite simple. There are three main components: the storage,
- the allocator and the container. FixedStorage is based on boost::array<char,N>
- and is on the stack or the heap. Storage has-a FixedStorage, and a chain of
- larger memory buffers on the heap that are created and cached as needed. The allocator is stored in
- your container, which
- is initialised with storage.<h3 id="Containers">
- Fixed
- Storage</h3>
- <p>
- The storage is provided via boost::monotonic::storage<size_t num_bytes></p>
- <p>
- Put it on the stack to use storage on the stack, or put it on the heap to use
- storage on the heap.</p>
- <h3 id="Containers0">
- Storage</h3>
- <p>
- Storage has a FixedStorage component, and a collection of memory buffers called
- a chain. To service an incoming allocation request, the Storage first attempts
- to allocate from its FixedStorage. If that fails, it uses space from the first
- suitable buffer in the chain.</p>
- <h3 id="Containers1">
- Shared
- Storage</h3>
- <p>
- This has a Storage that is protected by an internal mutex.</p>
- <h3>
- Allocator</h3>
- <p>
- boost::monotonic::allocator<T> provides a means for a set of containers to share
- monotonic::storage. <p>
- Allocations performed
- by this allocator are correctly aligned for each container independantly (thanks
- Artyom, Thorsten!); de-allocations
- requested by this allocator do nothing.</p>
- <p>
- Allocators are initialised with storage. There is no overhead added to any
- memory allocation; the only bytes used are the number of bytes required, plus
- whatever is required by the platform for correct alignment.</p>
- <p>
- De-allocation from a monotonic::allocator is a no-op.</p>
- <h3>
- Containers
- </h3>
- <p>
- The following container wrappers are, currently and precipitously, part of this proposal: </p>
- <ul>
- <li>boost::monotonic::list<T></li>
- <li>boost::monotonic::vector<T><li>boost::monotonic::map<K,T> <li>boost::monotonic::multi_map<K,T> </li>
- <li>boost::monotonic::set<T> </li>
- <li>boost::monotonic::multi_set<T> </li>
- <li>boost::monotonic::ptr_list<T> </li>
- <li>boost::monotonic::ptr_vector<T> </li>
- <li>boost::monotonic::ptr_map<K,T> </li>
- <lboost::monotonic::ptr_set<T> </li>
- </ul>
- <p>
- boost::unordered can have a similar treatment.</p>
- <p>
- Each of these are just the underlying container, which defaults to using
- boost::monotonic::allocator<T>.</p>
- <p>
- It has been strongly suggested that these convenience structures be removed from
- the proposal. For comparison, in the following Vector and Map are two exactly equivalent types:</p>
- <pre>ttypedef boost::monotonic::vector<int> Vector;
-typedef std::vector<int, boost::monotonic::allocator<int> > Vector;</pre>
- <pre>typedef boost::monotonic::map<int, boost::monotonic::list<int> > Map;
-typedef std::map<int, std::list<int, boost::monotonic::allocator<int> >, std::less<int>, boost::monotonic::allocator<int> > Map;</pre>
- <p>
- The container-wrappers currently remain part of the proposal, but this may well
- change. In the meantime, the user is quite capable of using either method.</p>
- <h2 id="ExampleUsage">
- Memory Fragmentation</h2>
- <p>
- The proposed The proposed system can be used to reduce memory fragmentation, or remove it
- completely. For example:</p>
- <pre>void Mainloop()()
-{
- boost::monotonic::storage<> storage;
- for (;;)
- {
- DoStuff(storage);
- storage.reset();
- }
-}</pre>
- <h2 id="ExampleUsage0">
- Thread Safety</h2>
- <p>
- Containers that are on the stack are thread-safe by default.</p>
- <p>
- Use boost::monotonic::shared_storage<> for multi-threaded applications
- otherwise.</p>
- <h2>
- Performance</h2>
- <p>
- This is still under investigation. Results to follow. The code in the sandbox
- provides a favorable indication, but far more exhaustive testing is required before
- any claims can be confidently made.</p>
- <h2>
- Example Usage
- </h2> <p>
- Quite often, we need to create a temporary collection of objects which will
- exist only for the duration of a code block. A common pattern for this is to
- collect a set of objects from a container to do some work on: </p>
- <div class="code">
- <pre><b>void</b> <b>MainLoop</b>()
-{
- boost::monotonic::storage<<span class="code-lang">> storage; <i><span
- class="code-comment"> // create local storage on the stack. default to 8k, will move to heap as required
-</span></i> std::list<Object, boost::monotonic::allocator<Object> > deathrow(storage); <i><span
- class="code-comment">// create a std::list that uses this storage</span></i></span></pre>
- <pre><span class="code-lang"><span
- class="code-comment"> foreach (object in world)
- {
- <span class="code-lang">ifIsDead(object))
- deathrow.push_back(object); <i><span class="code-comment">// allocation is just advancing a pointer
-</span></i> }
- foreach (object in deathrow)
- {
- world.Remove(object);
- object.Delete();
- }
- <span class="code-comment"><i>// storage is freed
-</i></span>} </div>
- <p>
- The same system can be used to store very large containers on the heap but still
- using a monotonic allocator:
- </p>
- <div class="code">
- <pre><b><span class="code-type">void</span></b> <b><span class="code-func">InlineHeapStorage</span></b>()
-{
- <i><span class="code-comment">// create inline storage on the heap
-</span></i> <b><span class="code-keyword">std</span></b>::auto_ptr<boost::monotonic::storage<1000*1000*1000> > storage = <b><span
- class="code-lang">new </b>boost::monotonic::storage<1000*1000*1000>();
-
- <i><span class="code-comment">// create a h// create a large mapping of ints to ints using a monotonic allocator
-</span></i> std::map<int, int, std::less<int>, monotonic::allocator<<span class="code-type"><b>int</b>> table(*storage);
-
- <i><span class="code-comment">// populate the container; no new heap allocations are performed
-</span></i> <b><span class="code-lang">for</span></b> (<b><span class="code-type">int</span></b> n = 0; n < 1000*1000; ++n)
- {
- <i><span class="code-comment">// storage created for the table (including the lists) is pre-allocated
-</span></i> <i><span class="code-comment">// and each allocation requires only a pointer advance
-</span></i> table[rand()] = n;
- }
-}
-</pre>
- </div>
- <p>
- Also, the stack-based allocation model can be used for per-frame allocation for
- temporary storage. By passing the storage down the call-stack (either explicitly
- as a parameter, or by storing within a visible member field), per-frame
- containers and other storage can be used without resorting to the heap. At the
- end of the frame, the storage is automatically released.
- </p>
- <div class="code">
- <pre><b><span class="code-type">void</span></b> <b><span class="code-func">DoSomething</span></b>(boost::monotonic::storage_base &storage)
-{
- std::list<Object, boost::monotonic::allocator<Object> > list(storage);
- <span class="code-comment"><i>// populate and use vector</i>
- DoSomethingElse(storage);
-}
-
-<b><span class="code-type">void</span></b> <b><span class="code-func">DoSDoSomethingElse</span></b>(boost::monotonic::storage_base &storage)
-{
- std::map<<span class="code-type"><b>int</b>, Object, std::less<int>, boost::monotonic::allocator<int> > map(storage);
- <i><span class="code-comment">// populate and use map
-</span></i>}
-
-<b><span class="code-type">void</span></b> <b><span class="code-func">MainLoop</span></b>()
-{
- <span class="code-lang">boost::monotonic::storage<> storage;</span>
-<b><span class="code-lang"> while</span></b> (!Finished())
- {
- DoSomething(storage);
- <i> storage.reset(); // set the number of bytes used to zero
-</i> }
-}
-</pre>
- </div>
- <p>
- Recursion also benefits from using the stack to store containers. For example,
- assuming a cyclic graph of objects, we can avoid infinite recursion by using a
- stack-based set:
- </p>
- <div class="code">
- <pre><b><span class="code-type">void</span></b> <b><span class="code-func">Object::Recurse</span></b>()
-{
- boost::monotonic::storage<> storage; <i><span class="code-comment">// create storage on the stack for a set
-</span></i> Recurse(std::set<<b><span class="code-type">int, std::less<int>, boost::monotonic::allocator<int> </b>>(storage)); <i><span
- class="code-comment">// recurse, passing the set
-</span></i>}
-
-<b><span class="code-type">void</span></b> <b><span class="code-func">Object::Recurse</span></b>(<span class="code-lang"><span
- class="code-comment">std::set<<b>int, std::less<int>, boost::monotonic::allocator<int> </b>></span></span> &set)
-{
- <b><span class="code-lang">if</span></b> (set.find(handle) != set.end()) <b><span
- class="code-lang">return</span></b>; <i><span class="code-comment">// avoid infinite recursion
-</span></i> set.insert(handle); <i><span class="code-comment">// add handle to set for testing later
-</span></i> DoSomething(); <i><span class="code-comment">// do something to this object
-</span></i> foreach (child object in <b><span class="code-lang">this</span></b>) <i><span
- class="code-comment">// visit all child objects
-</span></i> Recurse(set);
-}
-</pre>
- </div>
- <div id="reference" class="section">
- <h2>
- Notes</h2>
- <p>
- [1] It has been argued that the proposed allocator is not in fact "STL-compliant",
- as it includes a pointer to storage used by the allocator. In truth, the
- Standard doesn't state that allocators may not have any local data, only that
- STL implementations are free to treat allocators of the same type as having the
- same behavior. This proposal conforms to the standard.
- </p> <h2>
- References</h2><ul>
- <li>Boost.AlignedStorage</li>
- <li>Boost.AutoBuffer. A related service. Attempts to integrate this with STL has so
- far been unsuccessful. See libs/monotonic/test/main.cpp#test_auto_buffer</li>
- <li>Boost.IntrusiveContainer, for an alternative means of creating efficient
- containers.</li>
- </ul>
- </div>
- </div>
- </div>
-
-
-
-</BODY>
-</HTML>
Added: sandbox/monotonic/libs/monotonic/doc/introduction.xml
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/introduction.xml 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<section last-revision="$Date: 2009-06-02 13:38:02$">
+ <title>Introduction</title>
+
+<para>
+The <emphasis>Boost.Monotonic</emphasis> library provides storage, allocation and container types for use in high-performance and real-time applications.
+</para>
+<para>
+The library provides a means for allocation to come from the stack, or the heap, or a combination of both the stack and the heap. Allocation is fast, because de-allocation does nothing. As such, the amount of storage used by a <emphasis>monotonic allocator</emphasis> can only ever increase - hence the name of the library.
+</para>
+
+<para>
+ Allocation can be <emphasis>regionalised</emphasis> by application of user-supplied 'tag types' to specify a logical storage region. A second tag may be used to specify the <emphasis>access type</emphasis> for the region - which can be either global, guarded by a mutex, or using thread-local storage.
+</para>
+
+<para>
+Boost.Monotonic is generally used where performace matters most. By making deallocation a no-op, allocation of memory resources is extremely fast. In genreal, the programmer is required to release storage used at an appropriate time, however local scoping systems are provided by the library for the most common use cases.
+</para>
+
+</section>
Added: sandbox/monotonic/libs/monotonic/doc/monotonic.xml
Added: sandbox/monotonic/libs/monotonic/doc/rationale.xml
Added: sandbox/monotonic/libs/monotonic/doc/tests.xml
Added: sandbox/monotonic/libs/monotonic/doc/tutorial.xml
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/monotonic.xml 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library name="Monotonic" dirname="monotonic"
+ xmlns:xi="http://www.w3.org/2001/XInclude" id="monotonic"
+ last-revision="$Date: 2009-06-02$">
+<libraryinfo>
+ <author>
+ <firstname>Christian</firstname>
+ <surname>Schladetsch</surname>
+ <email>christian.schladetsch_at_[hidden]</email>
+ </author>
+
+ <copyright>
+ <year>2009</year>
+ <holder>Christian Schladetsch</holder>
+ </copyright>
+
+ <legalnotice>
+ <para>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <filename>LICENSE_1_0.txt</filename> or copy at <ulink
+ url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt>)</para>
+ </legalnotice>
+
+ <librarypurpose>Fast, general storage for allocation-only containers</librarypurpose>
+ <librarycategory name="category:container"/>
+</libraryinfo>
+
+<title>Boost.Monotonic</title>
+ <xi:include href="introduction.xml"/>
+ <xi:include href="tutorial.xml"/>
+ <xi:include href="containers.xml"/>
+ <!-- xi:include href="reference/reference.xml"/ -->
+ <xi:include href="faq.xml"/>
+ <xi:include href="design.xml"/>
+ <!-- xi:include href="rationale.xml"/ -->
+ <xi:include href="tests.xml"/>
+</library>
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/rationale.xml 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<section last-revision="$Date: 2007-11-25 13:38:02 -0500 (Sun, 25 Nov 2007) $">
+ <title>Design Rationale</title>
+
+ <using-namespace name="boost"/>
+ <using-namespace name="boost::monotonic"/>
+
+ <section>
+ <title>Monotonic Design Rationale</title>
+ <para>
+ TODO
+ </para>
+</section>
+</section>
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/tests.xml 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE testsuite PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<testsuite last-revision="$Date: 2007-11-25 13:38:02 -0500 (Sun, 25 Nov 2007) $">
+ <run-test filename="dead_slot_test.cpp">
+ <lib>../../../libs/test/build/boost_test_exec_monitor</lib>
+ <lib>../build/boost_signals</lib>
+ <purpose>
+<para>Ensure that calling <methodname>connect</methodname> with a slot
+that has already been disconnected via deletion does not actually
+connect to the slot.</para>
+ </purpose>
+ </run-test>
+
+ <run-test filename="deletion_test.cpp">
+ <lib>../../../libs/test/build/boost_test_exec_monitor</lib>
+ <lib>../build/boost_signals</lib>
+ <purpose>
+<para>Test deletion of slots.</para>
+ </purpose>
+ </run-test>
+
+ <run-test filename="ordering_test.cpp">
+ <lib>../../../libs/test/build/boost_test_exec_monitor</lib>
+ <lib>../build/boost_signals</lib>
+ <purpose><para>Test slot group ordering.</para></purpose>
+ </run-test>
+
+ <run-test filename="signal_n_test.cpp">
+ <lib>../../../libs/test/build/boost_test_exec_monitor</lib>
+ <lib>../build/boost_signals</lib>
+ <purpose>
+<para>Basic test of signal/slot connections and invocation using the
+<classname>boost::signalN</classname> class templates.</para>
+ </purpose>
+ </run-test>
+
+ <run-test filename="signal_test.cpp">
+ <lib>../../../libs/test/build/boost_test_exec_monitor</lib>
+ <lib>../build/boost_signals</lib>
+ <purpose>
+<para>Basic test of signal/slot connections and invocation using the
+<classname>boost::signal</classname> class template.</para>
+ </purpose>
+ <if-fails>
+<para>The <classname>boost::signal</classname> class template may not
+be usable on your compiler. However, the
+<classname>boost::signalN</classname> class templates may still be
+usable.</para>
+ </if-fails>
+ </run-test>
+
+ <run-test filename="trackable_test.cpp">
+ <lib>../../../libs/test/build/boost_test_exec_monitor</lib>
+ <lib>../build/boost_signals</lib>
+ <purpose>
+ <para>Test automatic lifetime management using
+ <classname>boost::trackable</classname> objects.</para>
+ </purpose>
+ </run-test>
+</testsuite>
==============================================================================
--- (empty file)
+++ sandbox/monotonic/libs/monotonic/doc/tutorial.xml 2009-07-01 20:46:22 EDT (Wed, 01 Jul 2009)
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<section last-revision="$Date:$" id="monotonic.tutorial">
+ <title>Tutorial</title>
+ <using-namespace name="boost"/>
+ <using-namespace name="boost::monotonic"/>
+
+ <section>
+ <title>Overview</title>
+<para>This tutorial progresses through the basic usage of the library, demonstrating how to use a monotonic allocator with STL containers, how to use monotonic storage directly without an allocator, how to use regions and access tags, and finally demonstrates the use of the supplied container library with stack-based local storage.
+</para>
+
+</section>
+
+<section><title>Basic Usage</title>
+<para>
+The following is a very quick introduction to Boost.Monotonic:
+</para>
+<programlisting>
+#include <boost/monotonic/allocator.hpp>
+
+using namespace boost;
+
+int main()
+{
+ {
+ std::list<int, monotonic::allocator<int> > list;
+ for (size_t n = 0; n < 1000; ++n)
+ list.push_back(n);
+ }
+ monotonic::static_storage<>::release();
+ return 0;
+}
+</programlisting>
+<para>
+Here we have created a std::list using a monotonic allocator. While we add new elements to the list in the for-loop, allocation is coming from monotonic storage in the default region with default access. The first 32k of allocation will come from the BSS segment embedded in the application image (the amount of such storage is configurable), then one that local storage is exhausted, later allocation requests will be serviced from the heap. Since de-allocation does nothing in a monotonic allocator, we must manually release the resources once we are finished, as shown above.
+</para>
+<para>
+The above example is clearly trivial, but if you were to benchmark it against using a default std::allocator you will find that monotonic is much faster[1]. This is the main reason for using this library; to provide efficient storage and allocation for temporary containers. We shall now move on to some more interesting examples, including how to use multiple containers that share the same strorage, using regions, using local stack-based storage, and dealing with threading issues.
+</para>
+</section>
+<section><title>Using Multiple Containers</title>
+<programlisting>
+int main()
+{
+ {
+ typedef std::vector<int, monotonic::allocator<int> > Vector;
+ typedef std::map<int, Vector, std::less<int>, monotonic::allocator<Vector> > Map;
+ Map map;
+ for (size_t n = 0; n < 10000; ++n)
+ {
+ map[rand()].push_back(n);
+ }
+ }
+ monotonic::static_storage<>::release();
+ return 0;
+};
+</programlisting>
+<para>
+ In this admittedly contrived example, we create a map of ints to vectors of ints, which each container using a monotonic allocator. Again, storage will only ever increase, so we must release it after we have finished using it. Again as well, benchmarking the performance of this against other allocation schemes[2] show that monotonic allocation is extremely fast and efficient.
+</para>
+</section>
+<section><title>Notes</title>
+[1] See further discussion on efficiency at xxx
+[2] See performance results at yyy
+</section>
+</section>
+