MCPcopy Create free account
hub / github.com/F-Stack/f-stack / RM_GetUsedMemoryRatio

Function RM_GetUsedMemoryRatio

app/redis-6.2.6/src/module.c:7569–7573  ·  view source on GitHub ↗

Return the a number between 0 to 1 indicating the amount of memory * currently used, relative to the Redis "maxmemory" configuration. * * * 0 - No memory limit configured. * * Between 0 and 1 - The percentage of the memory used normalized in 0-1 range. * * Exactly 1 - Memory limit reached. * * Greater 1 - More memory used than the configured limit. */

Source from the content-addressed store, hash-verified

7567 * * Greater 1 - More memory used than the configured limit.
7568 */
7569float RM_GetUsedMemoryRatio(){
7570 float level;
7571 getMaxmemoryState(NULL, NULL, NULL, &level);
7572 return level;
7573}
7574
7575/* --------------------------------------------------------------------------
7576 * ## Scanning keyspace and hashes

Callers

nothing calls this directly

Calls 1

getMaxmemoryStateFunction · 0.85

Tested by

no test coverage detected