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

Function ztrymalloc

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

Try allocating memory, and return NULL if failed. */

Source from the content-addressed store, hash-verified

123
124/* Try allocating memory, and return NULL if failed. */
125void *ztrymalloc(size_t size) {
126 void *ptr = ztrymalloc_usable(size, NULL);
127 return ptr;
128}
129
130/* Allocate memory or panic.
131 * '*usable' is set to the usable size if non NULL. */

Callers 3

stralgoLCSFunction · 0.85
rdbLoadLzfStringObjectFunction · 0.85

Calls 1

ztrymalloc_usableFunction · 0.85

Tested by

no test coverage detected