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

Function zcalloc

src/zmalloc.cpp:190–194  ·  view source on GitHub ↗

Allocate memory and zero it or panic */

Source from the content-addressed store, hash-verified

188
189/* Allocate memory and zero it or panic */
190void *zcalloc(size_t size, enum MALLOC_CLASS /*mclass*/) {
191 void *ptr = ztrycalloc_usable(size, NULL);
192 if (!ptr) zmalloc_oom_handler(size);
193 return ptr;
194}
195
196/* Try allocating memory, and return NULL if failed. */
197void *ztrycalloc(size_t size) {

Callers 15

_dictExpandFunction · 0.85
clusterSendPingFunction · 0.85
launchRdbSaveThreadFunction · 0.85
connCreateSocketFunction · 0.85
raxGenericInsertFunction · 0.85
createObjectFunction · 0.85
getMemoryOverheadDataFunction · 0.85

Calls 1

ztrycalloc_usableFunction · 0.85

Tested by

no test coverage detected