From 5369ddc1db797a96cced91bd467d172d41d41f9d Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Fri, 19 Feb 2021 13:10:06 +0000 Subject: win32: update sysinfo(2) implementation Add a call to GetPerformanceInfo. Treat the SystemCache member of the PERFORMANCE_INFORMATION structure as buffer RAM. Deduct it from available RAM. The numbers reported by 'free' move about in vaguely sensible ways when I start and stop programs, though I still don't know if they're in any way accurate. --- include/mingw.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/mingw.h b/include/mingw.h index c2a8b61bf..5cb5cb88c 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -364,8 +364,6 @@ struct sysinfo { unsigned long totalhigh; /* Total high memory size */ unsigned long freehigh; /* Available high memory size */ unsigned int mem_unit; /* Memory unit size in bytes */ - char _f[20-2*sizeof(long)-sizeof(int)]; - /* Padding to 64 bytes */ }; int sysinfo(struct sysinfo *info); -- cgit v1.2.3-55-g6feb