From 9ed9bd3bb5aac5aede1c415d5b7624ff5d77a343 Mon Sep 17 00:00:00 2001 From: Alastair Poole Date: Thu, 9 Jul 2020 22:13:25 +0100 Subject: [PATCH] macos: wrong, wrong, wrong. 1) test stuff more. 2) Don't have too many SSH sessions open and querying the wrong machines!!! --- src/bin/system/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/system/machine.c b/src/bin/system/machine.c index 615e3d4..6624e01 100644 --- a/src/bin/system/machine.c +++ b/src/bin/system/machine.c @@ -598,7 +598,7 @@ swap_out: host_statistics64(mach_port, HOST_VM_INFO, (host_info64_t)&vm_stats, &count) == KERN_SUCCESS) { - memory->used = memory->total - (vm_stats.inactive_count * page_size); + memory->used = (vm_stats.active_count + vm_stats.wire_count) * page_size; memory->cached = vm_stats.active_count * page_size; memory->shared = vm_stats.wire_count * page_size; memory->buffered = vm_stats.inactive_count * page_size;