Return freed memory to the OS on a background thread instead of the JS thread - #34181
Merged
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
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
Loading