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

Function zcalloc_usable

src/zmalloc.cpp:204–208  ·  view source on GitHub ↗

Allocate memory or panic. * '*usable' is set to the usable size if non NULL. */

Source from the content-addressed store, hash-verified

202/* Allocate memory or panic.
203 * '*usable' is set to the usable size if non NULL. */
204void *zcalloc_usable(size_t size, size_t *usable) {
205 void *ptr = ztrycalloc_usable(size, usable);
206 if (!ptr) zmalloc_oom_handler(size);
207 return ptr;
208}
209
210/* Try reallocating memory, and return NULL if failed.
211 * '*usable' is set to the usable size if non NULL. */

Callers

nothing calls this directly

Calls 1

ztrycalloc_usableFunction · 0.85

Tested by

no test coverage detected