From 596bc2a522c307b7c59e2648a50cb015818d67e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kay=20R=C3=B6pke?= Date: Sun, 31 May 2009 14:10:58 +0200 Subject: [PATCH] fix Darwin side of SIGAR-47: integer multlipcation overflow on 32bit builds with more than 4GB available memory --- src/os/darwin/darwin_sigar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/os/darwin/darwin_sigar.c b/src/os/darwin/darwin_sigar.c index b32e726b..dce7ba6d 100644 --- a/src/os/darwin/darwin_sigar.c +++ b/src/os/darwin/darwin_sigar.c @@ -460,7 +460,8 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem) return status; } - mem->free = vmstat.free_count * sigar->pagesize; + mem->free = vmstat.free_count; + mem->free =* sigar->pagesize; #elif defined(__FreeBSD__) if ((status = sigar_vmstat(sigar, &vmstat)) == SIGAR_OK) { mem->free = vmstat.v_free_count;