C++ new operator thread safety in linux and gcc 4

You will have to look very hard to find a platform that supports threads but doesn’t have a thread safe new. In fact, the thread safety of new (and malloc) is one of the reasons it’s so slow.

If you want a thread safe STL on the other hand, you may consider Intel TBB which has thread aware containers (although not all operations on them are thread safe).

Leave a Comment