title: LocalAlloc Vs GlobalAlloc Vs malloc Vs new
body: <p>I have searched for this on various links, but still the doubt persist.</p>
  
  <p>I do not understand the difference between <code>LocalAlloc</code> vs <code>GlobalAlloc</code> vs <code>malloc</code> vs <code>new</code> for memory allocation.</p>
  
  <p>I have gone through this link of MSDN:</p>
  
  <p><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa366533.aspx" rel="noreferrer">Comparing Memory Allocation Methods</a></p>
  
  <p>Please explain the following statement: </p>
  
  <blockquote>
    <p>The <strong>malloc</strong> function has the disadvantage of being run-time dependent. The <strong>new</strong> operator has the disadvantage of being compiler dependent and language dependent</p>
  </blockquote>