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

Function parser_append

deps/jemalloc/test/unit/stats_print.c:92–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92static bool
93parser_append(parser_t *parser, const char *str) {
94 size_t len = strlen(str);
95 char *buf = (parser->buf == NULL) ? mallocx(len + 1,
96 MALLOCX_TCACHE_NONE) : rallocx(parser->buf, parser->len + len + 1,
97 MALLOCX_TCACHE_NONE);
98 if (buf == NULL) {
99 return true;
100 }
101 memcpy(&buf[parser->len], str, len + 1);
102 parser->buf = buf;
103 parser->len += len;
104 return false;
105}
106
107static bool
108parser_tokenize(parser_t *parser) {

Callers 2

stats_print.cFile · 0.70
write_cbFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected