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

Function createStringObject

app/redis-6.2.6/src/object.c:119–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117 * we allocate as EMBSTR will still fit into the 64 byte arena of jemalloc. */
118#define OBJ_ENCODING_EMBSTR_SIZE_LIMIT 44
119robj *createStringObject(const char *ptr, size_t len) {
120 if (len <= OBJ_ENCODING_EMBSTR_SIZE_LIMIT)
121 return createEmbeddedStringObject(ptr,len);
122 else
123 return createRawStringObject(ptr,len);
124}
125
126/* Same as CreateRawStringObject, can return NULL if allocation fails */
127robj *tryCreateRawStringObject(const char *ptr, size_t len) {

Callers 15

processGopherRequestFunction · 0.70
luaRedisGenericCommandFunction · 0.70
sentinelEventFunction · 0.70
hashTypeGetValueObjectFunction · 0.70
notifyKeyspaceEventFunction · 0.70
stralgoLCSFunction · 0.70
enableTrackingFunction · 0.70
performEvictionsFunction · 0.70
createSharedObjectsFunction · 0.70
rdbLoadCheckModuleValueFunction · 0.70

Calls 2

createRawStringObjectFunction · 0.85

Tested by

no test coverage detected