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

Function zipmapNew

src/zipmap.c:96–102  ·  view source on GitHub ↗

Create a new empty zipmap. */

Source from the content-addressed store, hash-verified

94
95/* Create a new empty zipmap. */
96unsigned char *zipmapNew(void) {
97 unsigned char *zm = zmalloc(2, MALLOC_SHARED);
98
99 zm[0] = 0; /* Length */
100 zm[1] = ZIPMAP_END;
101 return zm;
102}
103
104/* Decode the encoded length pointed by 'p' */
105static unsigned int zipmapDecodeLength(unsigned char *p) {

Callers 1

zipmapTestFunction · 0.85

Calls 1

zmallocFunction · 0.85

Tested by

no test coverage detected