!7 compact module OSSizeTrayIcon > DynPrintLog { transient S value; // size in MB transient JLabel lbl; start { dm_addTrayIcon(lbl = dm_fieldLabel('value)); componentPopupMenuItem(lbl, "Garbage Collect", rThread { dm_gc(); actualUpdate(); }); doEveryAndNow(10.0, r actualUpdate); } void actualUpdate { long mb = toM(oshi_currentProcessResidentSize()); setField(value := str(mb)); toolTip(lbl, "OS size in memory: " + mb + " MB"); } }