!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)) { S addr = regexpExtractIC("^[0-9a-f]{1,16}-", s); if (addr != null) { addr = lpad(addr, 16, '0'); print("Have address: " + addr); range = takeFirst(6, addr); continue; } // else print("Not range: " + s); PairS p = parseColonProperty(s); if (eqic(pairA(p), "rss")) rssByRange.put(range, getOrCreate_long(rssByRange, range) + parseFirstLong(p.b)); } pnl(rssByRange); }