aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/ext/mt_allocator.h
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2004-11-05 19:58:03 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2004-11-05 19:58:03 +0000
commit6309eefc3dad5883ffc59a6fe55e472b9d88e999 (patch)
treecc0029c71210b825470053ab041bb2d5ee1ce457 /libstdc++-v3/include/ext/mt_allocator.h
parentca0e9281da684a6f811dd602783dce9cbdbf1a7f (diff)
downloadgcc-6309eefc3dad5883ffc59a6fe55e472b9d88e999.zip
gcc-6309eefc3dad5883ffc59a6fe55e472b9d88e999.tar.gz
gcc-6309eefc3dad5883ffc59a6fe55e472b9d88e999.tar.bz2
re PR libstdc++/17218 (unknown subjects in generated libstdc++ manpages)
2004-11-05 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/17218 PR libstdc++/17223 * docs/doxygen/filter: Remove. * docs/doxygen/filter.sed: Remove. * docs/doxygen/mainpage.html: Add link to functions. * docs/doxygen/run_doxygen: Changes due to new source filtering. * docs/doxygen/user.cfg.in: Update to doxygen 1.3.9.1, tweak. * include/bits/allocator.h: Tweaks for doxygen. * include/bits/char_traits.h: Same. * include/bits/codecvt.h: Same. * include/bits/concurrence.h: Same. * include/bits/locale_facets.h: Same. * include/ext/array_allocator.h: Same. * include/ext/debug_allocator.h: Same. * include/ext/malloc_allocator.h: Same. * include/ext/mt_allocator.h: Same. * include/ext/new_allocator.h: Same. * include/ext/pool_allocator.h: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/std/std_memory.h: Same. * include/tr1/array: Same. * include/tr1/tuple: Same. * config/locale/ieee_1003.1-2001/codecvt_specializations.h: Same. * config/os/gnu-linux/ctype_base.h: Same. From-SVN: r90137
Diffstat (limited to 'libstdc++-v3/include/ext/mt_allocator.h')
-rw-r--r--libstdc++-v3/include/ext/mt_allocator.h39
1 files changed, 25 insertions, 14 deletions
diff --git a/libstdc++-v3/include/ext/mt_allocator.h b/libstdc++-v3/include/ext/mt_allocator.h
index e5dab29..c48cef41 100644
--- a/libstdc++-v3/include/ext/mt_allocator.h
+++ b/libstdc++-v3/include/ext/mt_allocator.h
@@ -43,19 +43,10 @@
namespace __gnu_cxx
{
- /**
- * This is a fixed size (power of 2) allocator which - when
- * compiled with thread support - will maintain one freelist per
- * size per thread plus a "global" one. Steps are taken to limit
- * the per thread freelist sizes (by returning excess back to
- * "global").
- *
- * Further details:
- * http://gcc.gnu.org/onlinedocs/libstdc++/ext/mt_allocator.html
- */
typedef void (*__destroy_handler)(void*);
typedef void (*__create_handler)(void);
+ /// @brief Base class for pool object.
struct __pool_base
{
// Using short int as type for the binmap implies we are never
@@ -187,8 +178,11 @@ namespace __gnu_cxx
bool _M_init;
};
- // Data describing the underlying memory pool, parameterized on
- // threading support.
+
+ /**
+ * @brief Data describing the underlying memory pool, parameterized on
+ * threading support.
+ */
template<bool _Thread>
class __pool;
@@ -198,7 +192,7 @@ namespace __gnu_cxx
template<>
class __pool<false>;
- // Specialization for single thread.
+ /// Specialization for single thread.
template<>
class __pool<false> : public __pool_base
{
@@ -265,7 +259,7 @@ namespace __gnu_cxx
};
#ifdef __GTHREADS
- // Specialization for thread enabled, via gthreads.h.
+ /// Specialization for thread enabled, via gthreads.h.
template<>
class __pool<true> : public __pool_base
{
@@ -405,9 +399,11 @@ namespace __gnu_cxx
#endif
+ /// @brief Policy for shared __pool objects.
template<template <bool> class _PoolTp, bool _Thread>
struct __common_pool_policy;
+ /// Partial specialization for single thread.
template<template <bool> class _PoolTp>
struct __common_pool_policy<_PoolTp, false>
{
@@ -438,6 +434,7 @@ namespace __gnu_cxx
};
#ifdef __GTHREADS
+ /// Partial specialization for thread enabled, via gthreads.h.
template<template <bool> class _PoolTp>
struct __common_pool_policy<_PoolTp, true>
{
@@ -478,9 +475,11 @@ namespace __gnu_cxx
#endif
+ /// @brief Policy for individual __pool objects.
template<typename _Tp, template <bool> class _PoolTp, bool _Thread>
struct __per_type_pool_policy;
+ /// Partial specialization for single thread.
template<typename _Tp, template <bool> class _PoolTp>
struct __per_type_pool_policy<_Tp, _PoolTp, false>
{
@@ -515,6 +514,7 @@ namespace __gnu_cxx
};
#ifdef __GTHREADS
+ /// Partial specialization for thread enabled, via gthreads.h.
template<typename _Tp, template <bool> class _PoolTp>
struct __per_type_pool_policy<_Tp, _PoolTp, true>
{
@@ -558,6 +558,7 @@ namespace __gnu_cxx
};
#endif
+ /// @brief Base class for _Tp dependent member functions.
template<typename _Tp>
class __mt_alloc_base
{
@@ -598,6 +599,16 @@ namespace __gnu_cxx
#define __thread_default false
#endif
+ /**
+ * @brief This is a fixed size (power of 2) allocator which - when
+ * compiled with thread support - will maintain one freelist per
+ * size per thread plus a "global" one. Steps are taken to limit
+ * the per thread freelist sizes (by returning excess back to
+ * the "global" list).
+ *
+ * Further details:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/ext/mt_allocator.html
+ */
template<typename _Tp,
typename _Poolp = __common_pool_policy<__pool, __thread_default> >
class __mt_alloc : public __mt_alloc_base<_Tp>