Here you can find the source of getMemoryInfo()
public static String getMemoryInfo()
//package com.java2s; //License from project: Apache License public class Main { public static String getMemoryInfo() { return Runtime.getRuntime().totalMemory() / 1024L / 1024L + "M/" + Runtime.getRuntime().maxMemory() / 1024L / 1024L + "M"; }// ww w . j av a2 s . c o m }