This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Malloc thread safe and compiler versions
- From: "Brian D. McGrew" <brian at visionpro dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Tue, 04 Jan 2011 07:12:04 -0700
- Subject: Malloc thread safe and compiler versions
Good morning all,
I¹m more of a system administrator supporting software engineers than a
software engineer myself, so if my questions seem out of context, please
excuse, and hopefully help!
I just read on stackoverflow that if we compile with -pthreads, malloc is
thread safe on x86 and x86_64 hardware. Is this true???
If so, what version of gcc/g++ is that implemented in?
We're using CentOS 5.3_x86-64 and gcc-4.1.2-20080704 and about 90% of our
projects are compiled with g++ using -g -O2. Functionally speaking, is
there any reason I should upgrade gcc --- other than just to have the latest
version?
Thanks,
-b