!7 cmodule JavaHeapRaw > DynBigNumber { start { setDescription("Java heap used of " + toM(Runtime.getRuntime().maxMemory()) + " MB"); ownTimer(doEveryAndNow(1000, r actualUpdate)); } visualize { ret setToolTipText("Process ID: " + getProcessID(), componentPopupMenuItem(super.visualize(), "Garbage Collect", r { dm_gc(); actualUpdate(); })); } void actualUpdate { //long max = Runtime.getRuntime().maxMemory(); //long used = memoryUsedAfterLastGC(); long used = usedMemory(); setValue(toM(used) + " MB"); } }