def memory_info(self): f = open("/proc/%s/statm" % self.pid, 'rb') try: vms, rss = f.readline().split()[:2] return _common.pmem(int(rss) * PAGESIZE, int(vms) * PAGESIZE) finally: f.close()
def memory_info(self): # on Windows RSS == WorkingSetSize and VSM == PagefileUsage # fields of PROCESS_MEMORY_COUNTERS struct: # http://msdn.microsoft.com/en-us/library/windows/desktop/ # ms684877(v=vs.85).aspx t = self._get_raw_meminfo() return _common.pmem(t[2], t[7])
def memory_info(self): ret = cext.proc_basic_info(self.pid) rss, vms = ret[1] * 1024, ret[2] * 1024 return _common.pmem(rss, vms)
def memory_info(self): rss, vms = cext.proc_memory_info(self.pid)[:2] return _common.pmem(rss, vms)