| 2585 | } |
| 2586 | |
| 2587 | static int updateMaxmemory(long long val, long long prev, const char **err) { |
| 2588 | UNUSED(prev); |
| 2589 | UNUSED(err); |
| 2590 | if (val) { |
| 2591 | size_t used = zmalloc_used_memory()-freeMemoryGetNotCountedMemory(); |
| 2592 | if ((unsigned long long)val < used) { |
| 2593 | serverLog(LL_WARNING,"WARNING: the new maxmemory value set via CONFIG SET (%llu) is smaller than the current memory usage (%zu). This will result in key eviction and/or the inability to accept new write commands depending on the maxmemory-policy.", g_pserver->maxmemory, used); |
| 2594 | } |
| 2595 | performEvictions(false /*fPreSnapshot*/); |
| 2596 | } |
| 2597 | return 1; |
| 2598 | } |
| 2599 | |
| 2600 | static int updateFlashMaxmemory(long long val, long long prev, const char **err) { |
| 2601 | UNUSED(prev); |
nothing calls this directly
no test coverage detected