title: C - Check currently available free RAM?
body: <p>I know how to use <code>malloc()</code> and <code>free()</code> to allocate memory, but is there also a standard C function to check how much memory is left, so I can call that periodically to make sure my code has no memory leaks?</p>
  
  <p>The only thing I can think of is calling <code>malloc(1)</code> in a endless loop until it returns an error, but shouldn't there be a more efficient way?</p>