Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
91b49667
Commit
91b49667
authored
May 05, 2016
by
Salvatore Sanfilippo
Browse files
Merge pull request #3188 from therealbill/unstable
maxmemory_policy fix for #3187
parents
de3a6736
14086a46
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/config.c
View file @
91b49667
...
...
@@ -126,8 +126,8 @@ const char *configEnumGetNameOrUnknown(configEnum *ce, int val) {
}
/* Used for INFO generation. */
const
char
*
maxmemor
yToString
(
void
)
{
return
configEnumGetNameOrUnknown
(
maxmemory_policy_enum
,
server
.
maxmemory
);
const
char
*
evictPolic
yToString
(
void
)
{
return
configEnumGetNameOrUnknown
(
maxmemory_policy_enum
,
server
.
maxmemory
_policy
);
}
/*-----------------------------------------------------------------------------
...
...
src/server.c
View file @
91b49667
...
...
@@ -2937,7 +2937,7 @@ sds genRedisInfoString(char *section) {
char maxmemory_hmem[64];
size_t zmalloc_used = zmalloc_used_memory();
size_t total_system_mem = server.system_memory_size;
const char *evict_policy =
maxmemor
yToString();
const char *evict_policy =
evictPolic
yToString();
long long memory_lua = (long long)lua_gc(server.lua,LUA_GCCOUNT,0)*1024;
/* Peak memory is updated from time to time by serverCron() so it
...
...
src/server.h
View file @
91b49667
...
...
@@ -1367,7 +1367,7 @@ void closeListeningSockets(int unlink_unix_socket);
void
updateCachedTime
(
void
);
void
resetServerStats
(
void
);
unsigned
int
getLRUClock
(
void
);
const
char
*
maxmemor
yToString
(
void
);
const
char
*
evictPolic
yToString
(
void
);
#define RESTART_SERVER_NONE 0
#define RESTART_SERVER_GRACEFULLY (1<<0)
/* Do proper shutdown. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment