How to check how free RAM is available?

From Julia, you can use Sys.free_memory() which returns an unsigned integer with number of bytes that are free. If you want it in e.g. MiB do Sys.free_memory()/2^20. You can also get it by calling versioninfo(verbose=true) although that prints a lot of other info as well.

Note: versioninfo() is a part of InteractiveUtils in the Standard Library which is loaded automatically in the REPL. If you want to run it from a script you need to include using InteractiveUtils before calling it.

8 Likes