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

Function zmalloc_usable

src/zmalloc.cpp:144–148  ·  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

142/* Allocate memory or panic.
143 * '*usable' is set to the usable size if non NULL. */
144void *zmalloc_usable(size_t size, size_t *usable) {
145 void *ptr = ztrymalloc_usable(size, usable);
146 if (!ptr) zmalloc_oom_handler(size);
147 return ptr;
148}
149
150/* Allocation and free functions that bypass the thread cache
151 * and go straight to the allocator arena bins.

Callers

nothing calls this directly

Calls 1

ztrymalloc_usableFunction · 0.85

Tested by

no test coverage detected