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
aded138a
Commit
aded138a
authored
Nov 06, 2019
by
meir@redislabs.com
Browse files
return value between 0 to 100 instead of 0 to 1.
parent
089ee597
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
aded138a
...
@@ -5903,12 +5903,12 @@ size_t RM_MallocSize(void* ptr){
...
@@ -5903,12 +5903,12 @@ size_t RM_MallocSize(void* ptr){
* Return the a number between 0 to 1 indicating
* Return the a number between 0 to 1 indicating
* the amount of memory currently used.
* the amount of memory currently used.
* 0 - no memory limit
* 0 - no memory limit
* 1 and above, memory limit reached.
* 1
00
and above, memory limit reached.
*/
*/
float
RM_GetUsedMemoryPercentage
(){
float
RM_GetUsedMemoryPercentage
(){
float
level
;
float
level
;
getMaxmemoryState
(
NULL
,
NULL
,
NULL
,
&
level
);
getMaxmemoryState
(
NULL
,
NULL
,
NULL
,
&
level
);
return
level
;
return
level
*
100
;
}
}
/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
...
...
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