Commit d46dcf99 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Make process memory percentage calculation saner.

parent f56c8014
......@@ -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++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment