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

Function zrealloc_usable

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

273/* Reallocate memory or panic.
274 * '*usable' is set to the usable size if non NULL. */
275void *zrealloc_usable(void *ptr, size_t size, size_t *usable) {
276 ptr = ztryrealloc_usable(ptr, size, usable);
277 if (!ptr && size != 0) zmalloc_oom_handler(size);
278 return ptr;
279}
280
281/* Provide zmalloc_size() for systems where this function is not provided by
282 * 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