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

Function cbm_init

internal/cbm/cbm.c:871–884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

869static int cbm_initialized = 0;
870
871int cbm_init(void) {
872 if (cbm_initialized) {
873 return 0;
874 }
875 enum { CBM_INIT_DONE = 1 };
876 cbm_initialized = CBM_INIT_DONE;
877 /* Defense-in-depth allocator binds (idempotent). main() calls cbm_alloc_init
878 * first; this covers non-main entry points (pipeline passes call cbm_init).
879 * For sqlite the SQLITE_CONFIG_MALLOC bind only takes effect if it runs
880 * before sqlite initializes — main() guarantees that ordering; here it is a
881 * best-effort idempotent re-assert for paths that never hit main(). */
882 cbm_alloc_init();
883 return 0;
884}
885
886void cbm_reset_thread_parser(void) {
887 // Release parser's internal slab-allocated subtrees (stack, cached token).

Calls 1

cbm_alloc_initFunction · 0.85