fix
This commit is contained in:
parent
e3cdc765a1
commit
4c0cf9e5cd
@ -626,16 +626,10 @@ 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
|
||||||
* "maxmemory", attempt to free memory by evicting data (if it's safe to do so).
|
* "maxmemory", attempt to free memory by evicting data (if it's safe to do so).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user