code: public static double getUsedMemory() {
      	Runtime rt = Runtime.getRuntime();
      	
      	long memLong = rt.totalMemory() - rt.freeMemory();
      	double memDouble = memLong / (1024.0 * 1024.0);
      	memDouble = Math.round(memDouble * 100) / 100.0;
      	return memDouble;
      }
docs: Gets the memory used by the JVM in MB.
  @return Returns how much memory (in MB) is used by the JVM at the moment.