Here you can find the source of getHashMap()
public static HashMap<String, Long> getHashMap()
//package com.java2s; //License from project: Open Source License import java.util.HashMap; public class Main { public static HashMap<String, Long> getHashMap() { Runtime runtime = Runtime.getRuntime(); HashMap<String, Long> params = new HashMap<String, Long>(); params.put("Used", runtime.totalMemory() - runtime.freeMemory()); params.put("Free", runtime.freeMemory()); params.put("Total", runtime.totalMemory()); params.put("Max", runtime.maxMemory()); return params; }//from w w w.j ava 2s . co m }