diff options
author | Benjamin Kosnik <bkoz@redhat.com> | 2004-07-14 06:37:17 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2004-07-14 06:37:17 +0000 |
commit | 780028b6cff77a9f25f75a24047ab5f3b50a4834 (patch) | |
tree | cdb983cd86b1e1afba9b2e5cf5c1ce3c19e347c9 /libstdc++-v3/include/ext/mt_allocator.h | |
parent | 70049c7ce2da027e60dd09995f37ed2548e35c53 (diff) | |
download | gcc-780028b6cff77a9f25f75a24047ab5f3b50a4834.zip gcc-780028b6cff77a9f25f75a24047ab5f3b50a4834.tar.gz gcc-780028b6cff77a9f25f75a24047ab5f3b50a4834.tar.bz2 |
mt_allocator.html: Add docs for _Tune.
2004-07-13 Benjamin Kosnik <bkoz@redhat.com>
* docs/html/ext/mt_allocator.html: Add docs for _Tune.
* include/ext/mt_allocator.h (__mt_alloc::_S_get_options): Make public.
(__mt_alloc::_S_set_options): Same.
Add to comments.
2004-07-13 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Add allocator defaults
for linux.
* configure: Regenerated.
From-SVN: r84674
Diffstat (limited to 'libstdc++-v3/include/ext/mt_allocator.h')
-rw-r--r-- | libstdc++-v3/include/ext/mt_allocator.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/libstdc++-v3/include/ext/mt_allocator.h b/libstdc++-v3/include/ext/mt_allocator.h index f0ee2ebd..b7afdde 100644 --- a/libstdc++-v3/include/ext/mt_allocator.h +++ b/libstdc++-v3/include/ext/mt_allocator.h @@ -139,8 +139,12 @@ namespace __gnu_cxx // See http://gcc.gnu.org/ml/libstdc++/2001-07/msg00077.html size_t _M_chunk_size; - // The maximum number of supported threads. Our Linux 2.4.18 - // reports 4070 in /proc/sys/kernel/threads-max + // The maximum number of supported threads. For + // single-threaded operation, use one. Maximum values will + // vary depending on details of the underlying system. (For + // instance, Linux 2.4.18 reports 4070 in + // /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 @@ -172,6 +176,17 @@ namespace __gnu_cxx { } }; + static const _Tune + _S_get_options() + { return _S_options; } + + static void + _S_set_options(_Tune __t) + { + if (!_S_init) + _S_options = __t; + } + private: // We need to create the initial lists and set up some variables // before we can answer to the first request for memory. @@ -186,17 +201,6 @@ namespace __gnu_cxx // Configuration options. static _Tune _S_options; - static const _Tune - _S_get_options() - { return _S_options; } - - static void - _S_set_options(_Tune __t) - { - if (!_S_init) - _S_options = __t; - } - // Using short int as type for the binmap implies we are never // caching blocks larger than 65535 with this allocator typedef unsigned short int _Binmap_type; |