From f107407f761263587b7591256e1174b31c6fbdc2 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Wed, 15 Jan 2025 00:11:10 +0100 Subject: [PATCH] try to adjust test --- psutil/_psosx.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/psutil/_psosx.py b/psutil/_psosx.py index fa2c8b81d..de2674408 100644 --- a/psutil/_psosx.py +++ b/psutil/_psosx.py @@ -110,16 +110,12 @@ def virtual_memory(): """System virtual memory as a namedtuple.""" - total, active, inactive, wired, free, speculative = cext.virtual_mem() + total, active, inactive, wired, free, _speculative = cext.virtual_mem() # This is how Zabbix calculate avail and used mem: - # https://github.com/zabbix/zabbix/blob/trunk/src/libs/zbxsysinfo/ - # osx/memory.c + # https://github.com/zabbix/zabbix/blob/master/src/libs/zbxsysinfo/osx/memory.c # Also see: https://github.com/giampaolo/psutil/issues/1277 avail = inactive + free used = active + wired - # This is NOT how Zabbix calculates free mem but it matches "free" - # cmdline utility. - free -= speculative percent = usage_percent((total - avail), total, round_=1) return svmem(total, avail, percent, used, free, active, inactive, wired)