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

Function createStringObject

src/object.cpp:145–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143size_t OBJ_ENCODING_EMBSTR_SIZE_LIMIT = 52;
144
145robj *createStringObject(const char *ptr, size_t len) {
146 if (len <= OBJ_ENCODING_EMBSTR_SIZE_LIMIT)
147 return createEmbeddedStringObject(ptr,len);
148 else
149 return createRawStringObject(ptr,len);
150}
151
152/* Same as CreateRawStringObject, can return NULL if allocation fails */
153robj *tryCreateRawStringObject(const char *ptr, size_t len) {

Callers 15

dbRandomKeyFunction · 0.70
keysCommandCoreFunction · 0.70
scanCallbackFunction · 0.70
scanGenericCommandFunction · 0.70
getKeysInSlotFunction · 0.70
delKeysInSlotFunction · 0.70
clusterProcessPacketFunction · 0.70
migrateCommandFunction · 0.70
performEvictionsFunction · 0.70
lookupKeyByPatternFunction · 0.70
sortCommandFunction · 0.70
hashTypeGetValueObjectFunction · 0.70

Calls 2

createRawStringObjectFunction · 0.85

Tested by

no test coverage detected