Commit 1931ca4
committed
fix(watcher): reclaim mimalloc pages after in-process fallback reindex
watcher_index_fn routes re-indexing through the supervised subprocess (#832)
so the long-lived server hands RSS back to the OS on each cycle. But the
in-process degrade fallback — taken when the supervisor is off or the child
spawn fails — ran cbm_pipeline_run()+cbm_pipeline_free() without the paired
cbm_mem_collect() that every other post-pipeline-run site performs (mcp.c:5758,
pipeline.c:834, pass_parallel.c:799/995, graph_buffer.c:1678).
Because this fallback is the watcher's unattended path and fires on every poll
while the working tree is dirty, the worker-thread pages mimalloc abandons at
pool teardown were never returned. RSS ratcheted into tens of GB overnight
indexing a small repo (observed: ~55GB private commit on ~200 files, Windows,
where the supervised spawn degrades to in-process). Add the collect() to match
the established pattern and bound the fallback path's peak.
Signed-off-by: Greg Illingworth <g.illingworth86@gmail.com>1 parent 1c1b6df commit 1931ca4
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
| |||
0 commit comments