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

Function zmalloc_usable

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

130/* Allocate memory or panic.
131 * '*usable' is set to the usable size if non NULL. */
132void *zmalloc_usable(size_t size, size_t *usable) {
133 void *ptr = ztrymalloc_usable(size, usable);
134 if (!ptr) zmalloc_oom_handler(size);
135 return ptr;
136}
137
138/* Allocation and free functions that bypass the thread cache
139 * 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