diff --git a/src/object.c b/src/object.c index 406816140..90ccbc916 100644 --- a/src/object.c +++ b/src/object.c @@ -1017,7 +1017,7 @@ struct redisMemOverhead *getMemoryOverheadData(void) { mh->aof_buffer = mem; mem_total+=mem; - mem = 0; + mem = server.lua_scripts_mem; mem += dictSize(server.lua_scripts) * sizeof(dictEntry) + dictSlots(server.lua_scripts) * sizeof(dictEntry*); mem += dictSize(server.repl_scriptcache_dict) * sizeof(dictEntry) + diff --git a/src/server.c b/src/server.c index b537ee04a..726147bf1 100644 --- a/src/server.c +++ b/src/server.c @@ -3186,7 +3186,7 @@ sds genRedisInfoString(char *section) { bytesToHuman(peak_hmem,server.stat_peak_memory); bytesToHuman(total_system_hmem,total_system_mem); bytesToHuman(used_memory_lua_hmem,memory_lua); - bytesToHuman(used_memory_scripts_hmem,server.lua_scripts_mem); + bytesToHuman(used_memory_scripts_hmem,mh->lua_caches); bytesToHuman(used_memory_rss_hmem,server.cron_malloc_stats.process_rss); bytesToHuman(maxmemory_hmem,server.maxmemory); @@ -3251,7 +3251,7 @@ sds genRedisInfoString(char *section) { total_system_hmem, memory_lua, used_memory_lua_hmem, - server.lua_scripts_mem, + mh->lua_caches, used_memory_scripts_hmem, dictSize(server.lua_scripts), server.maxmemory,