From: Doug MacEachern Date: Fri, 17 Apr 2009 02:53:49 +0000 (-0700) Subject: Set process vmem_size and stack_size on FreeBSD X-Git-Tag: collectd-4.5.4~21 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=353ad874e44c7ffa1faa62a34ca2c40b0f047095;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 --- diff --git a/src/processes.c b/src/processes.c index 8cf2562e..387db594 100644 --- a/src/processes.c +++ b/src/processes.c @@ -1217,7 +1217,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_rss = procs[i].ki_rssize * 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;