Memory allocators / STL
Benjamin Kosnik
bkoz@redhat.com
Fri Oct 26 09:49:00 GMT 2001
> - Even if i redesign so that the application does not make use of any
> exceptions, will the STL still do? Can this be disabled and what will the
> effects be?
I don't think this has anything to do with exceptions. Without a clearer
picture (ie source or self contained test case) of what is going on, I
can't really say.
Note that you can also use CXXFLAGS='-fno-exceptions' to disable
exception handling, if you believe this is at issue.
> - Quite a few discussions on lists have been about __USE_MALLOC and other
> compiletime flags/options. What are the "default" for a MT program - is there
> really a need for anything else that -pthread at compile and -lpthread at link
> time?
There should not be anything required except using -pthread. You
shouldn't have to use __USE_MALLOC at all.
> - Are there any of the STL containers that should be avoided in a MT enviorment
> due to known bugs or have a large amount of overhead (i.e. thread locks)
No.
http://www.sgi.com/tech/stl/thread_safety.html
best,
benjamin
More information about the Libstdc++
mailing list