This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Memory allocators / STL
- To: stefan at noname4us dot com
- Subject: Re: Memory allocators / STL
- From: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Fri, 26 Oct 2001 09:49:32 -0700 (PDT)
- cc: gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, Sinisa Milivojevic <sinisa at mysql dot com>
> - 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