This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Change default allocator?




> 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]