MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / ztrymalloc

Function ztrymalloc

src/zmalloc.cpp:137–140  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

135
136/* Try allocating memory, and return NULL if failed. */
137void *ztrymalloc(size_t size) {
138 void *ptr = ztrymalloc_usable(size, NULL);
139 return ptr;
140}
141
142/* Allocate memory or panic.
143 * '*usable' is set to the usable size if non NULL. */

Callers 3

rdbLoadLzfStringObjectFunction · 0.85
stralgoLCSFunction · 0.85

Calls 1

ztrymalloc_usableFunction · 0.85

Tested by

no test coverage detected