Check how much memory is availble before running a simulation (closes #147).