This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Change default allocator?
- To: Stefan Olsson <stefan at noname4us dot com>
- Subject: Re: Change default allocator?
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Thu, 1 Nov 2001 13:59:14 -0800 (PST)
- cc: libstdc++ at gcc dot gnu dot org
> Is there _any_ way to change the default allocator used by libstdc++
> (other than __USE_MALLOC)?
Usually there is a default Allocator argument as a template parameter.
Just use pthread_alloc instead of allocator.
> We have finally found the "reason" for the slowdown in our application
> and the use of pthread_alloc seems to help alot, therefore we would like
> to use this as default and specifically set the default alloc on
> globally "shared" variables.
Can you be a little less vague about said "reason?"
Did you see the example code that was posted about this here:
http://gcc.gnu.org/ml/libstdc++/2001-10/msg00209.html
If you can modify this simple test case to demonstrate your problem
(shouldn't be too hard) the probability of intelligent discussion goes
way up.
-benjamin