MCPcopy Create free account
hub / github.com/antirez/ds4 / kv_cache_tool_map_hooks

Function kv_cache_tool_map_hooks

ds4_server.c:8694–8704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8692 free(e->id);
8693 free(e);
8694 tool_memory_release_block_locked(m, b);
8695 die("out of memory");
8696 }
8697 tool_memory_link_head(m, e);
8698 m->entries++;
8699 m->bytes += e->bytes;
8700 tool_memory_prune_locked(m);
8701}
8702
8703static void tool_memory_free(tool_memory *m) {
8704 while (m->tail) tool_memory_remove_entry_locked(m, m->tail);
8705 if (m->by_id) raxFree(m->by_id);
8706 if (m->by_block) raxFree(m->by_block);
8707 memset(m, 0, sizeof(*m));

Callers 2

kv_cache_try_load_textFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected