From 4c0cf9e5cd70e3899b415b3b04eba1275057a79b Mon Sep 17 00:00:00 2001 From: Alex Cope Date: Fri, 30 Jun 2023 10:45:19 -0700 Subject: [PATCH] fix --- src/evict.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/evict.cpp b/src/evict.cpp index 780ec0b63..c79c2414b 100644 --- a/src/evict.cpp +++ b/src/evict.cpp @@ -626,15 +626,9 @@ static unsigned long evictionTimeLimitUs() { } static void updateSysFreeMemory() { -#ifdef __linux__ if (g_pserver->force_eviction_percent) { - struct sysinfo sysinf; - memset(&sysinf, 0, sizeof sysinf); - if (!sysinfo(&sysinf)) { - g_pserver->cron_malloc_stats.sys_free = static_cast(sysinf.freeram); - } + g_pserver->cron_malloc_stats.sys_available = getMemAvailable(); } -#endif } /* Check that memory usage is within the current "maxmemory" limit. If over