Skip to content

Return freed memory to the OS on a background thread instead of the JS thread - #34181

Merged
Jarred-Sumner merged 14 commits into
mainfrom
claude/idle-theap-handoff
Jul 16, 2026
Merged

Return freed memory to the OS on a background thread instead of the JS thread#34181
Jarred-Sumner merged 14 commits into
mainfrom
claude/idle-theap-handoff

deps: bump mimalloc to bun-dev3-v2 with the idle-theap handoff

d940463
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 16, 2026 in 12m 35s

Code review found 1 potential issue

Found 3 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/jsc/bindings/BunJSCEventLoop.cpp:85-92 Dead code/comment left after gating sweep to Windows-only

Annotations

Check warning on line 92 in src/jsc/bindings/BunJSCEventLoop.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

Dead code/comment left after gating sweep to Windows-only

Gating this block to `OS(WINDOWS)` and deleting the `if (nowNs == 0) nowNs = us_internal_monotonic_ns();` fallback leaves stale artifacts: the comment's "(0 = take one)" clause now describes code that no longer exists (Windows always passes a reading, and if it passed 0 the sweep would be *skipped*, not "taken"), and the `us_internal_monotonic_ns` extern + its 3-line comment at the top of the file is now unreferenced (as is `mi_on_thread_idle` on non-Windows, and the `nowNs` parameter itself). P