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
d4465900
Commit
d4465900
authored
Sep 17, 2009
by
antirez
Browse files
maxmemory didn't worked in 64 systems for values > 4GB since it used to be an unsigned int. Fixed
parent
244de507
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
d4465900
...
...
@@ -269,7 +269,7 @@ struct redisServer {
redisClient
*
master
;
/* client that is master for this slave */
int
replstate
;
unsigned
int
maxclients
;
unsigned
int
maxmemory
;
unsigned
long
maxmemory
;
/* Sort parameters - qsort_r() is only available under BSD so we
* have to take this state global, in order to pass it to sortCompare() */
int
sort_desc
;
...
...
@@ -1116,7 +1116,7 @@ static void loadServerConfig(char *filename) {
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"maxclients"
)
&&
argc
==
2
)
{
server
.
maxclients
=
atoi
(
argv
[
1
]);
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"maxmemory"
)
&&
argc
==
2
)
{
server
.
maxmemory
=
atoi
(
argv
[
1
]);
server
.
maxmemory
=
strtoll
(
argv
[
1
]
,
NULL
,
10
);
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"slaveof"
)
&&
argc
==
3
)
{
server
.
masterhost
=
sdsnew
(
argv
[
1
]);
server
.
masterport
=
atoi
(
argv
[
2
]);
...
...
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