This commit is contained in:
Alex Cope 2023-06-30 10:45:19 -07:00 committed by Malavan Sotheeswaran
parent e3cdc765a1
commit 4c0cf9e5cd

View File

@ -626,15 +626,9 @@ static unsigned long evictionTimeLimitUs() {
} }
static void updateSysFreeMemory() { static void updateSysFreeMemory() {
#ifdef __linux__
if (g_pserver->force_eviction_percent) { if (g_pserver->force_eviction_percent) {
struct sysinfo sysinf; g_pserver->cron_malloc_stats.sys_available = getMemAvailable();
memset(&sysinf, 0, sizeof sysinf);
if (!sysinfo(&sysinf)) {
g_pserver->cron_malloc_stats.sys_free = static_cast<size_t>(sysinf.freeram);
}
} }
#endif
} }
/* Check that memory usage is within the current "maxmemory" limit. If over /* Check that memory usage is within the current "maxmemory" limit. If over