BSD related fixes:

* BUGFIX: Correct page size calculation for FreeBSD systems
  (thanks to Andrew Paulsen)
* Allow compilation without PLPA on systems that don't support it
  (thanks to Timothy Redaelli)
This commit is contained in:
Hisham Muhammad
2009-03-11 13:15:43 +00:00
parent b93e5c00b6
commit 3b950e4189
9 changed files with 37 additions and 14 deletions

View File

@ -696,7 +696,7 @@ static bool ProcessList_processEntries(ProcessList* this, char* dirname, Process
period * 100.0;
process->percent_cpu = MAX(MIN(percent_cpu, processors*100.0), 0.0);
process->percent_mem = (process->m_resident * PAGE_SIZE) /
process->percent_mem = (process->m_resident * PAGE_SIZE_KB) /
(float)(this->totalMem) *
100.0;