DEV Community

Carlos Saltos
Carlos Saltos

Posted on

How do you get free amount of RAM memory Mac has using Scala

What ?

A simple Scala program to get the RAM available on a Mac

Why ?

Because I want to check from SBT if there is enough available RAM memory to run certain compilation options and I would like to share with others

How ?

Just go to https://github.com/csaltos/mem-on-mac-scala/blob/main/MemOnMac.scala and copy paste the code, you can use it as bytes or gigabytes.

Top comments (0)