update
This commit is contained in:
parent
22d5ce41f3
commit
1dc5ea40f3
@ -2315,12 +2315,14 @@ void cronUpdateMemoryStats() {
|
|||||||
g_pserver->cron_malloc_stats.allocator_allocated = g_pserver->cron_malloc_stats.zmalloc_used;
|
g_pserver->cron_malloc_stats.allocator_allocated = g_pserver->cron_malloc_stats.zmalloc_used;
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
if (g_pserver->force_eviction_percent) {
|
||||||
struct sysinfo sysinf;
|
struct sysinfo sysinf;
|
||||||
memset(&sysinf, 0, sizeof sysinf);
|
memset(&sysinf, 0, sizeof sysinf);
|
||||||
if (!sysinfo(&sysinf)) {
|
if (!sysinfo(&sysinf)) {
|
||||||
g_pserver->cron_malloc_stats.sys_total = static_cast<size_t>(sysinf.totalram);
|
g_pserver->cron_malloc_stats.sys_total = static_cast<size_t>(sysinf.totalram);
|
||||||
g_pserver->cron_malloc_stats.sys_free = static_cast<size_t>(sysinf.freeram);
|
g_pserver->cron_malloc_stats.sys_free = static_cast<size_t>(sysinf.freeram);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user