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

Function ztrycalloc

src/zmalloc.cpp:197–200  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

195
196/* Try allocating memory, and return NULL if failed. */
197void *ztrycalloc(size_t size) {
198 void *ptr = ztrycalloc_usable(size, NULL);
199 return ptr;
200}
201
202/* Allocate memory or panic.
203 * '*usable' is set to the usable size if non NULL. */

Callers 1

_dictExpandFunction · 0.85

Calls 1

ztrycalloc_usableFunction · 0.85

Tested by

no test coverage detected