From 4461a431ae7d4608db589b9a1560e43bc6d1e5a2 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Fri, 26 Jan 2024 23:29:31 +0100 Subject: [PATCH] Fixed incorrect used and available memory for OSX --- src/osx/btop_collect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osx/btop_collect.cpp b/src/osx/btop_collect.cpp index 76b63c0..860e457 100644 --- a/src/osx/btop_collect.cpp +++ b/src/osx/btop_collect.cpp @@ -686,7 +686,7 @@ namespace Mem { if (host_statistics64(mach_host_self(), HOST_VM_INFO64, (host_info64_t)&p, &info_size) == 0) { mem.stats.at("free") = p.free_count * Shared::pageSize; mem.stats.at("cached") = p.external_page_count * Shared::pageSize; - mem.stats.at("used") = (p.active_count + p.inactive_count + p.wire_count) * Shared::pageSize; + mem.stats.at("used") = (p.active_count + p.wire_count) * Shared::pageSize; mem.stats.at("available") = Shared::totalMem - mem.stats.at("used"); }