From: Doug MacEachern Date: Mon, 4 May 2009 17:22:43 +0000 (+0200) Subject: Set process vmem_size and stack_size on FreeBSD X-Git-Tag: collectd-4.7.0~13^2~4 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8692579147f7e5cfbd4168a2da926dfd20e592f4;p=collectd.git Set process vmem_size and stack_size on FreeBSD Fixes: processes.c: In function 'ps_read': processes.c:328: warning: 'pse.vmem_size' is used uninitialized in this function processes.c:1300: note: 'pse.vmem_size' was declared here processes.c:330: warning: 'pse.stack_size' is used uninitialized in this function processes.c:1300: note: 'pse.stack_size' was declared here Signed-off-by: Doug MacEachern Signed-off-by: Florian Forster Cherry-picked *again* because the initial commit to the collectd-4.5 branch was incorrect. collectd-4.6 is the branch this should be in. Conflicts: src/processes.c --- diff --git a/src/processes.c b/src/processes.c index 4a564214..261accbc 100644 --- a/src/processes.c +++ b/src/processes.c @@ -1357,9 +1357,9 @@ static int ps_read (void) pse.num_proc = 1; pse.num_lwp = procs[i].ki_numthreads; - /* pse.vmem_size = procs[i].ki_size; */ + pse.vmem_size = procs[i].ki_size; pse.vmem_rss = procs[i].ki_rssize * getpagesize(); - /* pse.stack_size = procs[i].ki_ssize * getpagesize(); */ + pse.stack_size = procs[i].ki_ssize * getpagesize(); pse.vmem_minflt = 0; pse.vmem_minflt_counter = procs[i].ki_rusage.ru_minflt; pse.vmem_majflt = 0;