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

Function zrealloc

src/zmalloc.cpp:261–265  ·  view source on GitHub ↗

Reallocate memory and zero it or panic */

Source from the content-addressed store, hash-verified

259
260/* Reallocate memory and zero it or panic */
261void *zrealloc(void *ptr, size_t size, enum MALLOC_CLASS /*mclass*/) {
262 ptr = ztryrealloc_usable(ptr, size, NULL);
263 if (!ptr && size != 0) zmalloc_oom_handler(size);
264 return ptr;
265}
266
267/* Try Reallocating memory, and return NULL if failed. */
268void *ztryrealloc(void *ptr, size_t size) {

Callers 15

getKeysPrepareResultFunction · 0.85
cliIntegrateHelpFunction · 0.85
findHotKeysFunction · 0.85
clusterNodeAddSlaveFunction · 0.85
clusterReadHandlerFunction · 0.85
migrateCommandFunction · 0.85
queueMultiCommandFunction · 0.85
zmalloc_testFunction · 0.85
ziplistResizeFunction · 0.85
ziplistMergeFunction · 0.85

Calls 1

ztryrealloc_usableFunction · 0.85

Tested by

no test coverage detected