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

Function RM_MallocSize

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

For a given pointer allocated via RedisModule_Alloc() or * RedisModule_Realloc(), return the amount of memory allocated for it. * Note that this may be different (larger) than the memory we allocated * with the allocation calls, since sometimes the underlying allocator * will allocate more memory. */

Source from the content-addressed store, hash-verified

7555 * will allocate more memory.
7556 */
7557size_t RM_MallocSize(void* ptr){
7558 return zmalloc_size(ptr);
7559}
7560
7561/* Return the a number between 0 to 1 indicating the amount of memory
7562 * currently used, relative to the Redis "maxmemory" configuration.

Callers

nothing calls this directly

Calls 1

zmalloc_sizeFunction · 0.85

Tested by

no test coverage detected