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

Function zstrdup

src/zmalloc.cpp:332–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332char *zstrdup(const char *s) {
333 size_t l = strlen(s)+1;
334 char *p = (char*)zmalloc(l, MALLOC_SHARED);
335
336 memcpy(p,s,l);
337 return p;
338}
339
340size_t zmalloc_used_memory(void) {
341 size_t um;

Callers 15

latencyAddSampleFunction · 0.85
clusterCronFunction · 0.85
syncWithMasterFunction · 0.85
failoverCommandFunction · 0.85
updateMasterAuthFunction · 0.85
updateFailoverStatusFunction · 0.85
initMasterInfoFunction · 0.85
initServerConfigFunction · 0.85
restartServerFunction · 0.85
createPidFileFunction · 0.85
changeBindAddrFunction · 0.85
mainFunction · 0.85

Calls 1

zmallocFunction · 0.85

Tested by

no test coverage detected