This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Malloc thread safe and compiler versions


On 01/04/2011 02:12 PM, Brian D. McGrew wrote:

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?

None: it's a C library thing. As far as I'm aware malloc has been thread- safe in glibc since forever.

Andrew.


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