From 3b649445347bca76b7bb7101e90d99a51063b0ad Mon Sep 17 00:00:00 2001 From: Simon Thoby Date: Thu, 9 Jul 2020 16:57:23 +0200 Subject: [PATCH] Set the 'free' memory value to the 'available' memory on windows --- mem/mem_windows.go | 1 + 1 file changed, 1 insertion(+) diff --git a/mem/mem_windows.go b/mem/mem_windows.go index ced0b19..a925faa 100644 --- a/mem/mem_windows.go +++ b/mem/mem_windows.go @@ -42,6 +42,7 @@ func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { ret := &VirtualMemoryStat{ Total: memInfo.ullTotalPhys, Available: memInfo.ullAvailPhys, + Free: memInfo.ullAvailPhys, UsedPercent: float64(memInfo.dwMemoryLoad), }