This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/18970] 3.4 default memory allocator much slower than 3.3 allocator when large amounts of data are turned over
- From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2004 22:47:50 -0000
- Subject: [Bug libstdc++/18970] 3.4 default memory allocator much slower than 3.3 allocator when large amounts of data are turned over
- References: <20041213220807.18970.mj1@cog.brown.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bkoz at gcc dot gnu dot org 2004-12-13 22:47 -------
the default allocator did change for 3.4.x, from pool_allocator to new_allocator.
see:
http://gcc.gnu.org/onlinedocs/libstdc++/20_util/allocator.html
to change to the 3.3.x allocator, use __pool_alloc. you can configure with
--enable-libstdcxx-allocator=pool
to make this the default.
see:
http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html
anyway.
if you just want to hack in pool for new allocators, locally modify
/usr/include/c++/3.4.2/i386-redhat-linux/bits/c++allocator
to be
src/gcc/libstdc++-v3/config/allocator/pool_allocator_base.h
FWIW, it is recommended that you use __mt_alloc for your high-performance
allocator needs.
-benjamin
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18970