!7 p { int processID = nempty(args) ? parseInt(first(args)) : processID_int(); S text = loadTextFile("/proc/" + processID + "/smaps"); S range = null; new TreeMap rssByRange; for (S s : lines(text)) { if (regexpFindIC("^[0-9a-f]{8}-", s)) { range = takeFirst(3, s); print("Have range: " + range); continue; } PairS p = parseColonProperty(s); if (eqic(pairA(p), "rss")) rssByRange.put(range, getOrCreate_long(rssByRange, range) + parseFirstLong(p.b)); } pnl(rssByRange); }