Is access to the heap serialized? : <p>One rule every programmer quickly learns about multithreading is:  </p>

<p><em>If more than one thread has access to a data structure, and at least one of threads might modify that data structure, then you'd better serialize all accesses to that data structure, or you're in for a world of debugging pain</em>.  </p>

<p>Typically this serialization is done via a mutex -- i.e. a thread that wants to read or write the data structure locks the mutex, does whatever it needs to do, and then unlocks the mutex to make it available again to other threads.</p>

<p>Which brings me to the point:  the memory-heap of a process is a data structure which is accessible by multiple threads.  Does this mean that every call to default/non-overloaded <code>new</code> and <code>delete</code> is serialized by a process-global mutex, and is therefore a potential serialization-bottleneck that can slow down multithreaded programs?  Or do modern heap implementations avoid or mitigate that problem somehow, and if so, how do they do it?</p>

<p>(Note:  I'm tagging this question <code>linux</code>, to avoid the correct-but-uninformative "it's implementation-dependent" response, but I'd also be interested in hearing about how Windows and MacOS/X do it as well, if there are significant differences across implementations)</p>
