diff --git a/src/evict.cpp b/src/evict.cpp index 4e42c85dd..35d809e62 100644 --- a/src/evict.cpp +++ b/src/evict.cpp @@ -436,7 +436,7 @@ int getMaxmemoryState(size_t *total, size_t *logical, size_t *tofree, float *lev sys_available_mem_buffer = static_cast(g_pserver->cron_malloc_stats.sys_available - min_available_mem); if (sys_available_mem_buffer < 0) { long long mem_threshold = mem_reported + sys_available_mem_buffer; - maxmemory = ((long)maxmemory < mem_threshold) ? maxmemory : static_cast(mem_threshold); + maxmemory = ((long long)maxmemory < mem_threshold) ? maxmemory : static_cast(mem_threshold); } }