diff options
Diffstat (limited to 'gcc-4.9/libstdc++-v3/doc/html/manual/memory.html')
-rw-r--r-- | gcc-4.9/libstdc++-v3/doc/html/manual/memory.html | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/gcc-4.9/libstdc++-v3/doc/html/manual/memory.html b/gcc-4.9/libstdc++-v3/doc/html/manual/memory.html index 25cad27c4..9c0ca2388 100644 --- a/gcc-4.9/libstdc++-v3/doc/html/manual/memory.html +++ b/gcc-4.9/libstdc++-v3/doc/html/manual/memory.html @@ -92,7 +92,7 @@ or loading and unloading shared objects in memory. As such, using caching allocators on systems that do not support <code class="function">abi::__cxa_atexit</code> is not recommended. - </p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.impl"></a>Implementation</h4></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm234604985488"></a>Interface Design</h5></div></div></div><p> + </p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.impl"></a>Implementation</h4></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm269891950848"></a>Interface Design</h5></div></div></div><p> The only allocator interface that is supported is the standard C++ interface. As such, all STL containers have been adjusted, and all external allocators have @@ -105,7 +105,7 @@ </p><p> The base class that <code class="classname">allocator</code> is derived from may not be user-configurable. -</p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm234604981936"></a>Selecting Default Allocation Policy</h5></div></div></div><p> +</p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm269891947296"></a>Selecting Default Allocation Policy</h5></div></div></div><p> It's difficult to pick an allocation strategy that will provide maximum utility, without excessively penalizing some behavior. In fact, it's difficult just deciding which typical actions to measure @@ -142,7 +142,7 @@ The current default choice for <code class="classname">allocator</code> is <code class="classname">__gnu_cxx::new_allocator</code>. - </p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm234604968640"></a>Disabling Memory Caching</h5></div></div></div><p> + </p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm269891934000"></a>Disabling Memory Caching</h5></div></div></div><p> In use, <code class="classname">allocator</code> may allocate and deallocate using implementation-specific strategies and heuristics. Because of this, a given call to an allocator object's @@ -309,33 +309,33 @@ of the used and unused memory locations. It has its own <a class="link" href="bitmap_allocator.html" title="Chapter 21. The bitmap_allocator">chapter</a> in the documentation. - </p></li></ol></div></div><div class="bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a id="idm234603457424"></a><p><span class="citetitle"><em class="citetitle"> + </p></li></ol></div></div><div class="bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a id="idm269891879104"></a><p><span class="citetitle"><em class="citetitle"> ISO/IEC 14882:1998 Programming languages - C++ </em>. </span> isoc++_1998 - <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="idm234603455584"></a><p><span class="title"><em> + <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="idm269891877264"></a><p><span class="title"><em> <a class="link" href="http://www.drdobbs.com/the-standard-librarian-what-are-allocato/184403759" target="_top"> The Standard Librarian: What Are Allocators Good For? </a> </em>. </span><span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername"> C/C++ Users Journal - . </span></span></p></div><div class="biblioentry"><a id="idm234603451808"></a><p><span class="title"><em> + . </span></span></p></div><div class="biblioentry"><a id="idm269891873488"></a><p><span class="title"><em> <a class="link" href="http://www.hoard.org/" target="_top"> The Hoard Memory Allocator </a> - </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span></p></div><div class="biblioentry"><a id="idm234603449040"></a><p><span class="title"><em> + </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span></p></div><div class="biblioentry"><a id="idm269891870720"></a><p><span class="title"><em> <a class="link" href="http://people.cs.umass.edu/~emery/pubs/berger-oopsla2002.pdf" target="_top"> Reconsidering Custom Memory Allocation </a> - </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="author"><span class="firstname">Ben</span> <span class="surname">Zorn</span>. </span><span class="author"><span class="firstname">Kathryn</span> <span class="surname">McKinley</span>. </span><span class="copyright">Copyright © 2002 OOPSLA. </span></p></div><div class="biblioentry"><a id="idm234603442880"></a><p><span class="title"><em> + </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="author"><span class="firstname">Ben</span> <span class="surname">Zorn</span>. </span><span class="author"><span class="firstname">Kathryn</span> <span class="surname">McKinley</span>. </span><span class="copyright">Copyright © 2002 OOPSLA. </span></p></div><div class="biblioentry"><a id="idm269891864560"></a><p><span class="title"><em> <a class="link" href="http://www.angelikalanger.com/Articles/C++Report/Allocators/Allocators.html" target="_top"> Allocator Types </a> </em>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="publisher"><span class="publishername"> C/C++ Users Journal - . </span></span></p></div><div class="biblioentry"><a id="idm234603438144"></a><p><span class="citetitle"><em class="citetitle">The C++ Programming Language</em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 . </span><span class="pagenums">19.4 Allocators. </span><span class="publisher"><span class="publishername"> + . </span></span></p></div><div class="biblioentry"><a id="idm269891859824"></a><p><span class="citetitle"><em class="citetitle">The C++ Programming Language</em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 . </span><span class="pagenums">19.4 Allocators. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="idm234603433712"></a><p><span class="citetitle"><em class="citetitle">Yalloc: A Recycling C++ Allocator</em>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span></p></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="std.util.memory.auto_ptr"></a>auto_ptr</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="auto_ptr.limitations"></a>Limitations</h4></div></div></div><p>Explaining all of the fun and delicious things that can + . </span></span></p></div><div class="biblioentry"><a id="idm269891855392"></a><p><span class="citetitle"><em class="citetitle">Yalloc: A Recycling C++ Allocator</em>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span></p></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="std.util.memory.auto_ptr"></a>auto_ptr</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="auto_ptr.limitations"></a>Limitations</h4></div></div></div><p>Explaining all of the fun and delicious things that can happen with misuse of the <code class="classname">auto_ptr</code> class template (called <acronym class="acronym">AP</acronym> here) would take some time. Suffice it to say that the use of <acronym class="acronym">AP</acronym> @@ -445,7 +445,7 @@ drops to zero. Derived classes override those functions to destroy resources in a context where the correct dynamic type is known. This is an application of the technique known as type erasure. - </p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.impl"></a>Implementation</h4></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm234603392608"></a>Class Hierarchy</h5></div></div></div><p> + </p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.impl"></a>Implementation</h4></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm269891814224"></a>Class Hierarchy</h5></div></div></div><p> A <code class="classname">shared_ptr<T></code> contains a pointer of type <span class="type">T*</span> and an object of type <code class="classname">__shared_count</code>. The shared_count contains a @@ -492,7 +492,7 @@ C++11-only features are: rvalue-ref/move support, allocator support, aliasing constructor, make_shared & allocate_shared. Additionally, the constructors taking <code class="classname">auto_ptr</code> parameters are deprecated in C++11 mode. - </p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm234603370096"></a>Thread Safety</h5></div></div></div><p> + </p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm269891791712"></a>Thread Safety</h5></div></div></div><p> The <a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm#ThreadSafety" target="_top">Thread Safety</a> section of the Boost shared_ptr documentation says "shared_ptr @@ -537,7 +537,7 @@ compiler, standard library, platform etc. For the version of shared_ptr in libstdc++ the compiler and library are fixed, which makes things much simpler: we have an atomic CAS or we don't, see Lock Policy below for details. -</p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm234603362800"></a>Selecting Lock Policy</h5></div></div></div><p> +</p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm269891784416"></a>Selecting Lock Policy</h5></div></div></div><p> </p><p> There is a single <code class="classname">_Sp_counted_base</code> class, which is a template parameterized on the enum @@ -557,7 +557,7 @@ available policies are: <code class="constant">_S_Atomic</code> </p><p> Selected when GCC supports a builtin atomic compare-and-swap operation -on the target processor (see <a class="link" href="http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html" target="_top">Atomic +on the target processor (see <a class="link" href="http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html" target="_top">Atomic Builtins</a>.) The reference counts are maintained using a lock-free algorithm and GCC's atomic builtins, which provide the required memory synchronisation. @@ -578,7 +578,7 @@ used when libstdc++ is built without <code class="literal">--enable-threads</cod <code class="filename">ext/atomicity.h</code>, which detect if the program is multi-threaded. If only one thread of execution exists in the program then less expensive non-atomic operations are used. - </p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm234603348176"></a>Related functions and classes</h5></div></div></div><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>, + </p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm269891769792"></a>Related functions and classes</h5></div></div></div><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>, <code class="code">const_pointer_cast</code></span></dt><dd><p> As noted in N2351, these functions can be implemented non-intrusively using the alias constructor. However the aliasing constructor is only available @@ -611,13 +611,13 @@ is called. Users should not try to use this. As well as the extra constructors, this implementation also needs some members of _Sp_counted_deleter to be protected where they could otherwise be private. - </p></dd></dl></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.using"></a>Use</h4></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm234603331760"></a>Examples</h5></div></div></div><p> + </p></dd></dl></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.using"></a>Use</h4></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm269891753440"></a>Examples</h5></div></div></div><p> Examples of use can be found in the testsuite, under <code class="filename">testsuite/tr1/2_general_utilities/shared_ptr</code>, <code class="filename">testsuite/20_util/shared_ptr</code> and <code class="filename">testsuite/20_util/weak_ptr</code>. - </p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm234603328176"></a>Unresolved Issues</h5></div></div></div><p> + </p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="idm269891749856"></a>Unresolved Issues</h5></div></div></div><p> The <span class="emphasis"><em><code class="classname">shared_ptr</code> atomic access</em></span> clause in the C++11 standard is not implemented in GCC. </p><p> @@ -658,28 +658,28 @@ be private. code to work with, Peter Dimov in particular for his help and invaluable advice on thread safety. Phillip Jordan and Paolo Carlini for the lock policy implementation. - </p></div><div class="bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a id="idm234603316816"></a><p><span class="title"><em> + </p></div><div class="bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.biblio"></a>Bibliography</h4></div></div></div><div class="biblioentry"><a id="idm269891738624"></a><p><span class="title"><em> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2351.htm" target="_top"> Improving shared_ptr for C++0x, Revision 2 </a> </em>. </span><span class="subtitle"> N2351 - . </span></p></div><div class="biblioentry"><a id="idm234603314528"></a><p><span class="title"><em> + . </span></p></div><div class="biblioentry"><a id="idm269891736336"></a><p><span class="title"><em> <a class="link" href="http://open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2456.html" target="_top"> C++ Standard Library Active Issues List </a> </em>. </span><span class="subtitle"> N2456 - . </span></p></div><div class="biblioentry"><a id="idm234603312240"></a><p><span class="title"><em> + . </span></p></div><div class="biblioentry"><a id="idm269891734048"></a><p><span class="title"><em> <a class="link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2461.pdf" target="_top"> Working Draft, Standard for Programming Language C++ </a> </em>. </span><span class="subtitle"> N2461 - . </span></p></div><div class="biblioentry"><a id="idm234603309936"></a><p><span class="title"><em> + . </span></p></div><div class="biblioentry"><a id="idm269891731744"></a><p><span class="title"><em> <a class="link" href="http://boost.org/libs/smart_ptr/shared_ptr.htm" target="_top"> Boost C++ Libraries documentation, shared_ptr </a> </em>. </span><span class="subtitle"> N2461 - . </span></p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pairs.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="utilities.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="traits.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Pairs </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Traits</td></tr></table></div></body></html>
\ No newline at end of file + . </span></p></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pairs.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="utilities.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="traits.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Pairs </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Traits</td></tr></table></div></body></html> |