diff --git a/Makefile b/Makefile index 8b11a7b..465e62f 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # PKG = free-for-macos -VER = 1.1.0 +VER = 1.2.0 CWD = $(shell pwd) PREFIX ?= /usr/local diff --git a/free.c b/free.c index f88893b..8379937 100644 --- a/free.c +++ b/free.c @@ -6,17 +6,10 @@ #include #include -#include #include -#include #include #include #include -#include -#include -#include -#include -#include #include #include "free.h" @@ -167,7 +160,7 @@ int main(int argc, char **argv) { formatBytes(vm_stat.wire_count * page_size, mem.wired, sizeof(mem.wired), human); // cached file = purgeable_count + external_page_count; verified formatBytes((vm_stat.purgeable_count + vm_stat.external_page_count) * page_size, mem.cached, sizeof(mem.cached), human); - // truely-free = free-count - speculative_count + // truely-free = free_count - speculative_count // used = total - truely-free - cached; partially verified, still small discrepancy formatBytes(hbi.max_mem - (vm_stat.free_count - vm_stat.speculative_count + vm_stat.purgeable_count + vm_stat.external_page_count) * page_size, mem.used, sizeof(mem.used), human); // app memory = internal_page_count - purgeable_count; verified