MCPcopy Create free account
hub / github.com/couchbase/fleece / allocKey

Method allocKey

Fleece/Support/ConcurrentMap.cc:257–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255
256
257 const char* ConcurrentMap::allocKey(slice key) {
258 auto result = (char*)_heap.alloc(key.size + 1);
259 if (result) {
260 key.copyTo(result);
261 result[key.size] = 0;
262 }
263 return result;
264 }
265
266
267 bool ConcurrentMap::freeKey(const char *allocedKey) {

Callers

nothing calls this directly

Calls 2

allocMethod · 0.80
copyToMethod · 0.80

Tested by

no test coverage detected