title: About thread safety in malloc and free
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/855763/malloc-thread-safe">Malloc thread-safe?</a>  </p>
  </blockquote>
  
  <p>I heard that glibc malloc() was not thread safe, since several threads of a process calling malloc() simultaneously will lead to undefined behaviour. And my question is if a thread calls free() will another thread is calling malloc(), will this lead to undefined behaviour as well?</p>