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

Function pp_spill_env_read

src/pipeline/pass_parallel.c:858–864  ·  view source on GitHub ↗

CBM_MEM_SPILL=1 forces spill mode from the first file (tests, small * machines); CBM_MEM_SPILL=0 keeps results in memory even over budget. Read * once per extraction run, never cached per process: a test toggles it. */

Source from the content-addressed store, hash-verified

856 * machines); CBM_MEM_SPILL=0 keeps results in memory even over budget. Read
857 * once per extraction run, never cached per process: a test toggles it. */
858static int pp_spill_env_read(void) {
859 char buf[CBM_SZ_16];
860 if (cbm_safe_getenv("CBM_MEM_SPILL", buf, sizeof(buf), NULL)) {
861 return buf[0] == '1' ? 1 : 0;
862 }
863 return 2; /* unset: the budget decides */
864}
865static bool pp_spill_forced_by_env(const extract_ctx_t *ec) {
866 return ec->spill_env == 1;
867}

Callers 1

cbm_parallel_extract_exFunction · 0.85

Calls 1

cbm_safe_getenvFunction · 0.85

Tested by

no test coverage detected