mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Make process memory percentage calculation saner.
This commit is contained in:
parent
f56c8014f7
commit
d46dcf99fd
@ -602,8 +602,8 @@ void ProcessList_processEntries(ProcessList* this, char* dirname, int parent, fl
|
||||
process->percent_cpu = (process->utime + process->stime - lasttimes) /
|
||||
period * 100.0;
|
||||
|
||||
process->percent_mem = process->m_resident /
|
||||
(float)(this->usedMem - this->cachedMem - this->buffersMem) *
|
||||
process->percent_mem = (process->m_resident * PAGE_SIZE) /
|
||||
(float)(this->totalMem) *
|
||||
100.0;
|
||||
|
||||
this->totalTasks++;
|
||||
|
Loading…
Reference in New Issue
Block a user