mt_allocator.h (struct __per_type_pool_policy<,, [...]): Scale _M_chunk_size too...
authorPaolo Carlini <pcarlini@suse.de>
Wed, 26 Jan 2005 16:34:58 +0000 (16:34 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 26 Jan 2005 16:34:58 +0000 (16:34 +0000)
commitb929615a7c328c01cc7ebd7010938f504f6356b3
tree735d411e5a31df0e5c2c6752a6afe49e32cbc2cb
parent6f642f985272e36ec5bac248a65e912605727337
mt_allocator.h (struct __per_type_pool_policy<,, [...]): Scale _M_chunk_size too with sizeof(_Tp)...

2005-01-26  Paolo Carlini  <pcarlini@suse.de>

* include/ext/mt_allocator.h
(struct __per_type_pool_policy<,, false>::_S_get_pool,
struct __per_type_pool_policy<,, true>::_S_get_pool): Scale
_M_chunk_size too with sizeof(_Tp), otherwise the allocator
breaks down as soon as sizeof(_Tp) >~ _S_chunk_size / 128;
reduce to 64 the multiplier for _M_max_bytes (safer wrt
_Binmap_type being a short); trivial reformattings.
* testsuite/ext/mt_allocator/check_allocate_big_per_type.cc: New.

From-SVN: r94268
libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/mt_allocator.h
libstdc++-v3/testsuite/ext/mt_allocator/check_allocate_big_per_type.cc [new file with mode: 0644]