MCPcopy Create free account
hub / github.com/F-Stack/f-stack / streamNew

Function streamNew

app/redis-6.2.6/src/t_stream.c:67–75  ·  view source on GitHub ↗

Create a new stream data structure. */

Source from the content-addressed store, hash-verified

65
66/* Create a new stream data structure. */
67stream *streamNew(void) {
68 stream *s = zmalloc(sizeof(*s));
69 s->rax = raxNew();
70 s->length = 0;
71 s->last_id.ms = 0;
72 s->last_id.seq = 0;
73 s->cgroups = NULL; /* Created on demand to save memory when not used. */
74 return s;
75}
76
77/* Free a stream, including the listpacks stored inside the radix tree. */
78void freeStream(stream *s) {

Callers 1

createStreamObjectFunction · 0.85

Calls 2

zmallocFunction · 0.85
raxNewFunction · 0.85

Tested by

no test coverage detected