mirror of
https://github.com/aristocratos/btop.git
synced 2025-12-23 22:29:08 -05:00
Fixed incorrect used and available memory for OSX
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user