From 8692579147f7e5cfbd4168a2da926dfd20e592f4 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Mon, 4 May 2009 19:22:43 +0200 Subject: [PATCH] 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 --- src/processes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.30.2