diff options
Diffstat (limited to 'libstdc++-v3/doc/xml/manual/allocator.xml')
-rw-r--r-- | libstdc++-v3/doc/xml/manual/allocator.xml | 167 |
1 files changed, 67 insertions, 100 deletions
diff --git a/libstdc++-v3/doc/xml/manual/allocator.xml b/libstdc++-v3/doc/xml/manual/allocator.xml index ca1c8cb8609..b73554eb90e 100644 --- a/libstdc++-v3/doc/xml/manual/allocator.xml +++ b/libstdc++-v3/doc/xml/manual/allocator.xml @@ -1,7 +1,8 @@ -<section id="std.util.memory.allocator" xreflabel="Allocator"> +<section xmlns="http://docbook.org/ns/docbook" version="5.0" + xml:id="std.util.memory.allocator" xreflabel="Allocator"> <?dbhtml filename="allocator.html"?> -<sectioninfo> +<info><title>Allocators</title> <keywordset> <keyword> ISO C++ @@ -10,9 +11,9 @@ allocator </keyword> </keywordset> -</sectioninfo> +</info> + -<title>Allocators</title> <para> Memory management for Standard Library entities is encapsulated in a @@ -24,8 +25,8 @@ management classes. </para> -<section id="allocator.req"> -<title>Requirements</title> +<section xml:id="allocator.req"><info><title>Requirements</title></info> + <para> The C++ standard only gives a few directives in this area: @@ -87,15 +88,14 @@ </section> -<section id="allocator.design_issues"> -<title>Design Issues</title> +<section xml:id="allocator.design_issues"><info><title>Design Issues</title></info> + <para> The easiest way of fulfilling the requirements is to call <function>operator new</function> each time a container needs memory, and to call <function>operator delete</function> each time - the container releases memory. This method may be <ulink - url="http://gcc.gnu.org/ml/libstdc++/2001-05/msg00105.html">slower</ulink> + the container releases memory. This method may be <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/ml/libstdc++/2001-05/msg00105.html">slower</link> than caching the allocations and re-using previously-allocated memory, but has the advantage of working correctly across a wide variety of hardware and operating systems, including large @@ -138,11 +138,11 @@ </section> -<section id="allocator.impl"> -<title>Implementation</title> +<section xml:id="allocator.impl"><info><title>Implementation</title></info> - <section> - <title>Interface Design</title> + + <section><info><title>Interface Design</title></info> + <para> The only allocator interface that @@ -165,8 +165,8 @@ </section> - <section> - <title>Selecting Default Allocation Policy</title> + <section><info><title>Selecting Default Allocation Policy</title></info> + <para> It's difficult to pick an allocation strategy that will provide @@ -189,8 +189,8 @@ Over multiple iterations, various STL container objects have elements inserted to some maximum amount. A variety of allocators are tested. - Test source for <ulink url="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/sequence.cc?view=markup">sequence</ulink> - and <ulink url="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/associative.cc?view=markup">associative</ulink> + Test source for <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/sequence.cc?view=markup">sequence</link> + and <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert/associative.cc?view=markup">associative</link> containers. </para> @@ -205,7 +205,7 @@ on a per-thread basis, as well as measuring thread contention for memory resources. Test source - <ulink url="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert_erase/associative.cc?view=markup">here</ulink>. + <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/testsuite/performance/23_containers/insert_erase/associative.cc?view=markup">here</link>. </para> </listitem> @@ -215,9 +215,9 @@ </para> <para> Test source for - <ulink url="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc?view=markup">sequence</ulink> + <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/sequence.cc?view=markup">sequence</link> and - <ulink url="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc?view=markup">associative</ulink> + <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/viewcvs/trunk/libstdc++-v3/testsuite/performance/23_containers/producer_consumer/associative.cc?view=markup">associative</link> containers. </para> </listitem> @@ -231,8 +231,8 @@ </section> - <section> - <title>Disabling Memory Caching</title> + <section><info><title>Disabling Memory Caching</title></info> + <para> In use, <classname>allocator</classname> may allocate and @@ -285,8 +285,8 @@ </section> -<section id="allocator.using"> -<title>Using a Specific Allocator</title> +<section xml:id="allocator.using"><info><title>Using a Specific Allocator</title></info> + <para> You can specify different memory management schemes on a @@ -305,8 +305,8 @@ </programlisting> </section> -<section id="allocator.custom"> -<title>Custom Allocators</title> +<section xml:id="allocator.custom"><info><title>Custom Allocators</title></info> + <para> Writing a portable C++ allocator would dictate that the interface @@ -323,8 +323,8 @@ </section> -<section id="allocator.ext"> -<title>Extension Allocators</title> +<section xml:id="allocator.ext"><info><title>Extension Allocators</title></info> + <para> Several other allocators are provided as part of this @@ -472,8 +472,7 @@ <para> A high-performance fixed-size allocator with exponentially-increasing allocations. It has its own - documentation, found <link - linkend="manual.ext.allocator.mt">here</link>. + documentation, found <link linkend="manual.ext.allocator.mt">here</link>. </para> </listitem> @@ -484,21 +483,20 @@ <para> A high-performance allocator that uses a bit-map to keep track of the used and unused memory locations. It has its own - documentation, found <link - linkend="manual.ext.allocator.bitmap">here</link>. + documentation, found <link linkend="manual.ext.allocator.bitmap">here</link>. </para> </listitem> </orderedlist> </section> -<bibliography id="allocator.biblio"> -<title>Bibliography</title> +<bibliography xml:id="allocator.biblio"><info><title>Bibliography</title></info> + <biblioentry> - <title> + <citetitle> ISO/IEC 14882:1998 Programming languages - C++ - </title> + </citetitle> <abbrev> isoc++_1998 </abbrev> @@ -506,17 +504,13 @@ </biblioentry> <biblioentry> - <biblioid class="uri"> - <ulink url="http://www.drdobbs.com/cpp/184403759"> - <citetitle> - The Standard Librarian: What Are Allocators Good For? - </citetitle> - </ulink> + <biblioid xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.drdobbs.com/cpp/184403759" class="uri"> </biblioid> - <author> - <firstname>Matt</firstname> - <surname>Austern</surname> - </author> + <citetitle> + The Standard Librarian: What Are Allocators Good For? + </citetitle> + + <author><personname><firstname>Matt</firstname><surname>Austern</surname></personname></author> <publisher> <publishername> C/C++ Users Journal @@ -525,39 +519,25 @@ </biblioentry> <biblioentry> - <biblioid class="uri"> - <ulink url="http://www.cs.umass.edu/~emery/hoard/"> - <citetitle> - The Hoard Memory Allocator - </citetitle> - </ulink> + <biblioid xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.cs.umass.edu/~emery/hoard/" class="uri"> </biblioid> - <author> - <firstname>Emery</firstname> - <surname>Berger</surname> - </author> + <citetitle> + The Hoard Memory Allocator + </citetitle> + + <author><personname><firstname>Emery</firstname><surname>Berger</surname></personname></author> </biblioentry> <biblioentry> - <biblioid class="uri"> - <ulink url="http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf"> - <citetitle> - Reconsidering Custom Memory Allocation - </citetitle> - </ulink> + <biblioid xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf" class="uri"> </biblioid> - <author> - <firstname>Emery</firstname> - <surname>Berger</surname> - </author> - <author> - <firstname>Ben</firstname> - <surname>Zorn</surname> - </author> - <author> - <firstname>Kathryn</firstname> - <surname>McKinley</surname> - </author> + <citetitle> + Reconsidering Custom Memory Allocation + </citetitle> + + <author><personname><firstname>Emery</firstname><surname>Berger</surname></personname></author> + <author><personname><firstname>Ben</firstname><surname>Zorn</surname></personname></author> + <author><personname><firstname>Kathryn</firstname><surname>McKinley</surname></personname></author> <copyright> <year>2002</year> <holder>OOPSLA</holder> @@ -566,21 +546,14 @@ <biblioentry> - <biblioid class="uri"> - <ulink url="http://www.angelikalanger.com/Articles/C++Report/Allocators/Allocators.html"> - <citetitle> - Allocator Types - </citetitle> - </ulink> + <biblioid xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.angelikalanger.com/Articles/C++Report/Allocators/Allocators.html" class="uri"> </biblioid> - <author> - <firstname>Klaus</firstname> - <surname>Kreft</surname> - </author> - <author> - <firstname>Angelika</firstname> - <surname>Langer</surname> - </author> + <citetitle> + Allocator Types + </citetitle> + + <author><personname><firstname>Klaus</firstname><surname>Kreft</surname></personname></author> + <author><personname><firstname>Angelika</firstname><surname>Langer</surname></personname></author> <publisher> <publishername> C/C++ Users Journal @@ -589,14 +562,11 @@ </biblioentry> <biblioentry> - <title>The C++ Programming Language</title> - <author> - <firstname>Bjarne</firstname> - <surname>Stroustrup</surname> - </author> + <citetitle>The C++ Programming Language</citetitle> + <author><personname><firstname>Bjarne</firstname><surname>Stroustrup</surname></personname></author> <copyright> <year>2000</year> - <holder></holder> + <holder/> </copyright> <pagenums>19.4 Allocators</pagenums> <publisher> @@ -607,11 +577,8 @@ </biblioentry> <biblioentry> - <title>Yalloc: A Recycling C++ Allocator</title> - <author> - <firstname>Felix</firstname> - <surname>Yen</surname> - </author> + <citetitle>Yalloc: A Recycling C++ Allocator</citetitle> + <author><personname><firstname>Felix</firstname><surname>Yen</surname></personname></author> </biblioentry> </bibliography> |