(SIGAR-188) implement mem actual free/used on MacOSX

This commit is contained in:
Doug MacEachern 2009-11-03 14:18:54 -08:00
parent 089ba0d93c
commit a4915e8ed6
1 changed files with 2 additions and 0 deletions

View File

@ -468,6 +468,8 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem)
mem->free = vmstat.free_count;
mem->free *= sigar->pagesize;
kern = vmstat.inactive_count;
kern *= sigar->pagesize;
#elif defined(__FreeBSD__)
if ((status = sigar_vmstat(sigar, &vmstat)) == SIGAR_OK) {
kern = vmstat.v_cache_count + vmstat.v_inactive_count;