In multithreaded C/C++, does malloc/new lock the heap when allocating memory
Asked 2010-12-24T05:33:50.877
26
I'm curious as to whether there is a lock on memory allocation if two threads simultaneously request to allocate memory. I am using OpenMP to do multithreading, C++ code.
OS's: mostly linux, but would like to know for Windows and Mac as well.