title: What happens when different object files use different malloc implementations
body: <p>I have a couple of questions.</p>
  
  <ol>
  <li><p>Suppose a program is compiled using 2 object files. Each uses malloc and free in most of their functions. But these object files were generated at different times and happen to be using different malloc implementations. Let's say the implementations share variable names and function names. <strong>Will the program work fine or not? Why?</strong></p></li>
  <li><p>If a program has object file 1 and 2, code from object file 1 call malloc and allocates some memory then frees it. Now code from object file 2 calls malloc. <strong>Can it use the memory that was freed? How does it work underneath?</strong></p></li>
  </ol>