From: octo Date: Wed, 5 Apr 2006 22:01:31 +0000 (+0000) Subject: Fixed typo (vm_data vs. vm_stat), included mach/mach_host.h. X-Git-Tag: liboping-0.1.0~124 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=984e46beca9a09afa029aaf571a77fe2241eb864;p=collectd.git Fixed typo (vm_data vs. vm_stat), included mach/mach_host.h. --- diff --git a/src/memory.c b/src/memory.c index b1a62475..77a6dacc 100644 --- a/src/memory.c +++ b/src/memory.c @@ -24,16 +24,21 @@ #include "common.h" #include "plugin.h" -/* TODO #include */ #ifdef HAVE_MACH_KERN_RETURN_H # include #endif #ifdef HAVE_MACH_MACH_INIT_H # include #endif +#ifdef HAVE_MACH_MACH_HOST_H +# include +#endif #ifdef HAVE_MACH_HOST_PRIV_H # include #endif +#ifdef MACH_VM_STATISTICS_H +# include +#endif #if defined (HOST_VM_INFO) || defined(KERNEL_LINUX) || defined(HAVE_LIBKSTAT) # define MEMORY_HAVE_READ 1 @@ -75,7 +80,7 @@ static void memory_init (void) { #if defined(HOST_VM_INFO) port_host = mach_host_self (); - host_page_size(port_host, &pagesize); + host_page_size (port_host, &pagesize); /* #endif HOST_VM_INFO */ #elif defined(KERNEL_LINUX) @@ -160,7 +165,7 @@ static void memory_read (void) wired = vm_data.wire_count * pagesize; active = vm_data.active_count * pagesize; inactive = vm_data.inactive_count * pagesize; - free = vm_stat.free_count * pagesize; + free = vm_data.free_count * pagesize; memory_submit (wired + active, -1, inactive, free); /* #endif HOST_VM_INFO */