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

Function zmalloc

app/redis-6.2.6/src/zmalloc.c:118–122  ·  view source on GitHub ↗

Allocate memory or panic */

Source from the content-addressed store, hash-verified

116
117/* Allocate memory or panic */
118void *zmalloc(size_t size) {
119 void *ptr = ztrymalloc_usable(size, NULL);
120 if (!ptr) zmalloc_oom_handler(size);
121 return ptr;
122}
123
124/* Try allocating memory, and return NULL if failed. */
125void *ztrymalloc(size_t size) {

Callers 15

stressGetKeysFunction · 0.85
queueLoadModuleFunction · 0.85
rewriteConfigReadOldFileFunction · 0.85
lwCreateCanvasFunction · 0.85
dictCreateFunction · 0.85
dictAddRawFunction · 0.85
dictGetIteratorFunction · 0.85
stringFromLongLongFunction · 0.85
listCreateFunction · 0.85
listAddNodeHeadFunction · 0.85
listAddNodeTailFunction · 0.85

Calls 1

ztrymalloc_usableFunction · 0.85

Tested by

no test coverage detected