This commit is contained in:
Alex Cope 2023-06-30 11:23:00 -07:00
parent 01b7bc4cc1
commit e80ff9ec70

View File

@ -625,7 +625,7 @@ static unsigned long evictionTimeLimitUs() {
return ULONG_MAX; /* No limit to eviction time */ return ULONG_MAX; /* No limit to eviction time */
} }
static void updateSysFreeMemory() { static void updateSysAvailableMemory() {
if (g_pserver->force_eviction_percent) { if (g_pserver->force_eviction_percent) {
g_pserver->cron_malloc_stats.sys_available = getMemAvailable(); g_pserver->cron_malloc_stats.sys_available = getMemAvailable();
} }
@ -854,7 +854,7 @@ int performEvictions(bool fPreSnapshot) {
* across the dbAsyncDelete() call, while the thread can * across the dbAsyncDelete() call, while the thread can
* release the memory all the time. */ * release the memory all the time. */
if (g_pserver->lazyfree_lazy_eviction) { if (g_pserver->lazyfree_lazy_eviction) {
updateSysFreeMemory(); updateSysAvailableMemory();
if (getMaxmemoryState(NULL,NULL,NULL,NULL) == C_OK) { if (getMaxmemoryState(NULL,NULL,NULL,NULL) == C_OK) {
break; break;
} }
@ -886,7 +886,7 @@ int performEvictions(bool fPreSnapshot) {
cant_free: cant_free:
if (mem_freed > 0) { if (mem_freed > 0) {
updateSysFreeMemory(); updateSysAvailableMemory();
} }
if (g_pserver->m_pstorageFactory) if (g_pserver->m_pstorageFactory)