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. */
| 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. */ |
| 858 | static 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 | } |
| 865 | static bool pp_spill_forced_by_env(const extract_ctx_t *ec) { |
| 866 | return ec->spill_env == 1; |
| 867 | } |
no test coverage detected