aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-25 10:05:27 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-25 10:05:27 +0000
commit01c9f0815d1a2b4dde901c7a5ce5ded4f0b89462 (patch)
tree3396c8e8917b221c952e56902ba7ded53da1a892
parentd030ec838b0c0ffa7c84bbffb06ff200c83048a3 (diff)
2006-09-25 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/29179 * include/ext/mt_allocator.h (__pool_base): Adjust/extend documentation in comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117193 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/ext/mt_allocator.h16
2 files changed, 16 insertions, 6 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 0c09db148ce..410f39f7f29 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-25 Paolo Carlini <pcarlini@suse.de>
+
+ PR libstdc++/29179
+ * include/ext/mt_allocator.h (__pool_base): Adjust/extend
+ documentation in comments.
+
2006-09-24 Paolo Carlini <pcarlini@suse.de>
* include/tr1/boost_shared_ptr.h (shared_ptr<>::shared_ptr(const
diff --git a/libstdc++-v3/include/ext/mt_allocator.h b/libstdc++-v3/include/ext/mt_allocator.h
index 4dcd4373e4e..bc2d61f6eec 100644
--- a/libstdc++-v3/include/ext/mt_allocator.h
+++ b/libstdc++-v3/include/ext/mt_allocator.h
@@ -50,7 +50,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
struct __pool_base
{
// Using short int as type for the binmap implies we are never
- // caching blocks larger than 65535 with this allocator.
+ // caching blocks larger than 32768 with this allocator.
typedef unsigned short int _Binmap_type;
// Variables used to configure the behavior of the allocator,
@@ -73,19 +73,23 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// Allocation requests (after round-up to power of 2) below
// this value will be handled by the allocator. A raw new/
// call will be used for requests larger than this value.
+ // NB: Must be much smaller than _M_chunk_size and in any
+ // case <= 32768.
size_t _M_max_bytes;
-
+
// Size in bytes of the smallest bin.
- // NB: Must be a power of 2 and >= _M_align.
+ // NB: Must be a power of 2 and >= _M_align (and of course
+ // much smaller than _M_max_bytes).
size_t _M_min_bin;
-
+
// In order to avoid fragmenting and minimize the number of
// new() calls we always request new memory using this
// value. Based on previous discussions on the libstdc++
// mailing list we have choosen the value below.
// See http://gcc.gnu.org/ml/libstdc++/2001-07/msg00077.html
+ // NB: At least one order of magnitude > _M_max_bytes.
size_t _M_chunk_size;
-
+
// The maximum number of supported threads. For
// single-threaded operation, use one. Maximum values will
// vary depending on details of the underlying system. (For
@@ -93,7 +97,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// /proc/sys/kernel/threads-max, while Linux 2.6.6 reports
// 65534)
size_t _M_max_threads;
-
+
// Each time a deallocation occurs in a threaded application
// we make sure that there are no more than
// _M_freelist_headroom % of used memory on the freelist. If