From f8d2613320cfce415d5638097632c77f7e0646ee Mon Sep 17 00:00:00 2001 From: Walt Gribben Date: Wed, 10 Jan 2007 01:28:12 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11820 --- checkin_notes | 10 +++++----- lib/procinfo_unix.C | 7 ++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/checkin_notes b/checkin_notes index e5965b03f1..9bba72477a 100755 --- a/checkin_notes +++ b/checkin_notes @@ -331,13 +331,13 @@ Rom 9 Jan 2007 boincmgr_curl.vcproj Walt 9 Jan 2007 - - core client: Change function that calculates RAM used by a - science project to return the max memory used by one process + - core client: Change function that calculates RAM and SWAP used + by a science project to return the max used by a process instead of totaling the process/child processes. Fixes the - problem where the same RAM used gets counted multiple times - for some science apps. + problem where the same RAM and SWAP used gets counted multiple + times for some science apps. - client/ + lib/ procinfo_unix.cpp David 9 Jan 2007 diff --git a/lib/procinfo_unix.C b/lib/procinfo_unix.C index a5c8c3c678..3d3201d1f0 100644 --- a/lib/procinfo_unix.C +++ b/lib/procinfo_unix.C @@ -200,10 +200,15 @@ void add_child_totals(PROCINFO& pi, vector& piv, int pid, int rlvl) { if (p.parentid == pid) { pi.kernel_time += p.kernel_time; pi.user_time += p.user_time; - pi.swap_size += p.swap_size; + + // only count process with most swap and memory + if (p.swap_size > pi.swap_size) { + pi.swap_size = p.swap_size; + } if (p.working_set_size > pi.working_set_size) { pi.working_set_size = p.working_set_size; } + p.is_boinc_app = true; // look for child process of this one add_child_totals(pi, piv, p.id, rlvl+1); // recursion - woo hoo!