title: Getting the amount of memory used, both objectively and as a % of available
body: <p>I would like to get the % of memory used by a program I am trying to run. It'll only be run on a Unix-based environment.</p>
  
  <p>As far as I can tell, this should be <code>real_usage()</code> or <code>memory_get_usage()</code> in PHP, but I am unaware which is what I am supposed to use - there's little documentation and some documentation says that this is not possible.</p>
  
  <p>I want to disallow a certain condition from executing once 75% of the available memory is used, or 125MB - whichever is first. How do I do this in PHP?
  &nbsp;</p>