Skip to content

Commit

Permalink
fix3
Browse files Browse the repository at this point in the history
Signed-off-by: Sher Sun <sher.sun@huawei.com>
  • Loading branch information
Sher Sun committed Apr 30, 2024
1 parent a594b55 commit 2466cb4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/server.c
Expand Up @@ -5682,8 +5682,11 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) {
long long memory_lua = evalMemory();
long long memory_functions = functionsMemory();
struct serverMemOverhead *mh = getMemoryOverheadData();
unsigned char mem_allocator[64] = ZMALLOC_LIB;

#if defined(USE_JEMALLOC)
char defrag_supported[] = "yes";
#else
char defrag_supported[] = "no";
#endif
/* Peak memory is updated from time to time by serverCron() so it
* may happen that the instantaneous value is slightly bigger than
* the peak value. This may confuse users, so we update the peak
Expand Down Expand Up @@ -5758,8 +5761,8 @@ sds genRedisInfoString(dict *section_dict, int all_sections, int everything) {
"mem_overhead_db_hashtable_rehashing:%zu\r\n", mh->overhead_db_hashtable_rehashing,
"active_defrag_running:%d\r\n", server.active_defrag_running,
"lazyfree_pending_objects:%zu\r\n", lazyfreeGetPendingObjectsCount(),
"defrag_supported: %s\r\n", (mem_allocator[0]=='j') ? "yes" : "no",
"lazyfreed_objects:%zu\r\n", lazyfreeGetFreedObjectsCount()));
"lazyfreed_objects:%zu\r\n", lazyfreeGetFreedObjectsCount(),
"defrag_supported: %s\r\n", defrag_supported));
freeMemoryOverheadData(mh);
}

Expand Down

0 comments on commit 2466cb4

Please sign in to comment.