Obtain available/free RAM of computer in Swift
<p>I'm looking to get the value of available/free computer RAM in Swift 2.2. I've read <a href="https://stackoverflow.com/a/10830858/4353019">this answer by Viktor Latypov</a> which suggested <a href="https://stackoverflow.com/questions/583736/determine-physical-mem-size-programmatically-on-osx">this question</a>. Unfortunately, the question asked about "physical memory size" (total memory i.e. 16 GB), but I am looking for "available/free memory".</p>

<p>I've also read about the <code>NSProcessInfo</code> class, but the <code>physicalMemory()</code> function is not what I am looking for.</p>

<p>Any ideas?</p>