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

Function zcalloc_usable

app/redis-6.2.6/src/zmalloc.c:192–196  ·  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

190/* Allocate memory or panic.
191 * '*usable' is set to the usable size if non NULL. */
192void *zcalloc_usable(size_t size, size_t *usable) {
193 void *ptr = ztrycalloc_usable(size, usable);
194 if (!ptr) zmalloc_oom_handler(size);
195 return ptr;
196}
197
198/* Try reallocating memory, and return NULL if failed.
199 * '*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