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

Function zrealloc_usable

app/redis-6.2.6/src/zmalloc.c:263–267  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

261/* Reallocate memory or panic.
262 * '*usable' is set to the usable size if non NULL. */
263void *zrealloc_usable(void *ptr, size_t size, size_t *usable) {
264 ptr = ztryrealloc_usable(ptr, size, usable);
265 if (!ptr && size != 0) zmalloc_oom_handler(size);
266 return ptr;
267}
268
269/* Provide zmalloc_size() for systems where this function is not provided by
270 * malloc itself, given that in that case we store a header with this

Callers

nothing calls this directly

Calls 1

ztryrealloc_usableFunction · 0.85

Tested by

no test coverage detected