MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cbm_ts_realloc

Function cbm_ts_realloc

internal/cbm/cbm.c:807–818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

805 return block;
806}
807static void *cbm_ts_realloc(void *p, size_t n) {
808 size_t old_size = p ? mi_usable_size(p) : 0;
809 CBM_MEMEV_BACKING(1);
810 void *grown = mi_realloc(p, n);
811 CBM_MEMEV_BACKING(-1);
812 if (grown) {
813 cbm_mem_class_remove_external(CBM_MEM_CLASS_TS_TREE, old_size);
814 cbm_mem_class_add_external(CBM_MEM_CLASS_TS_TREE, mi_usable_size(grown));
815 }
816 BOUND_REALLOC(p, grown, n);
817 return grown;
818}
819static void cbm_ts_free(void *p) {
820 if (p) {
821 cbm_mem_class_remove_external(CBM_MEM_CLASS_TS_TREE, mi_usable_size(p));

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected