This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libstdc++ - version 3 default allocator
- From: Paolo Carlini <pcarlini at suse dot de>
- To: sameer dot atre at capsilon dot com
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Tue, 05 Jul 2005 13:19:47 +0200
- Subject: Re: libstdc++ - version 3 default allocator
- References: <42CA63E2.7030403@capsilon.com>
Sameer Atre wrote:
> How can I get the same behaviour in version 3 of libstdc++ when I want
> to change the default allocator for all containers.
Currently, there isn't an exact replacement, I'm afraid.
Either you build the whole library passing a specific
--enable-libstdcxx-allocator= option (see
http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html) - thus changing
the default allocator for the entire library, not only the containers -
or you include from your code one of the allocators available under /ext
and then pass it to each container as the second template argument. I
would suggest experimenting a bit with the second possibility, as a start.
In general, 4.0.x is much better than any previous release series as far
as allocators are concerned.
Paolo.