Commit 47de6f6d by Paolo Carlini Committed by Paolo Carlini

re PR libstdc++/29179 (bugs in mt_allocator)

2006-09-25  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/29179
	* include/ext/mt_allocator.h (__pool_base): Adjust/extend
	documentation in comments.

From-SVN: r117193
parent 582df53e
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> 2006-09-24 Paolo Carlini <pcarlini@suse.de>
* include/tr1/boost_shared_ptr.h (shared_ptr<>::shared_ptr(const * include/tr1/boost_shared_ptr.h (shared_ptr<>::shared_ptr(const
......
...@@ -50,7 +50,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -50,7 +50,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
struct __pool_base struct __pool_base
{ {
// Using short int as type for the binmap implies we are never // 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; typedef unsigned short int _Binmap_type;
// Variables used to configure the behavior of the allocator, // Variables used to configure the behavior of the allocator,
...@@ -73,10 +73,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -73,10 +73,13 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// Allocation requests (after round-up to power of 2) below // Allocation requests (after round-up to power of 2) below
// this value will be handled by the allocator. A raw new/ // this value will be handled by the allocator. A raw new/
// call will be used for requests larger than this value. // 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_t _M_max_bytes;
// Size in bytes of the smallest bin. // 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; size_t _M_min_bin;
// In order to avoid fragmenting and minimize the number of // In order to avoid fragmenting and minimize the number of
...@@ -84,6 +87,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -84,6 +87,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// value. Based on previous discussions on the libstdc++ // value. Based on previous discussions on the libstdc++
// mailing list we have choosen the value below. // mailing list we have choosen the value below.
// See http://gcc.gnu.org/ml/libstdc++/2001-07/msg00077.html // 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; size_t _M_chunk_size;
// The maximum number of supported threads. For // The maximum number of supported threads. For
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment