diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-23 03:12:29 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-23 03:12:35 -0300 |
| commit | 1b886923d74863cbe334f06464a508bcd098157e (patch) | |
| tree | de160f35ec09e7189aabfa2f4292881a0f5d87b4 /src/fs.zig | |
| parent | d5c37d9122240fe95d308fbe15874e14dd786c5a (diff) | |
| download | cloud9-1b886923d74863cbe334f06464a508bcd098157e.tar.gz cloud9-1b886923d74863cbe334f06464a508bcd098157e.zip | |
fs: look through parked slots by pointer
references() iterated s.slots by value, which copied every slot with its
park data (8 MiB at the default capacity) onto the caller's stack: in
pardes that left the editor thread's whole 8 MiB stack resident.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/fs.zig')
| -rw-r--r-- | src/fs.zig | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -591,7 +591,9 @@ pub fn Server(comptime Backend: type, comptime opts: Options) type { const held = if (opts.fid_index) s.fids[0..s.high_water] else s.fids[0..]; for (held) |fid| if (fid.used and fid.node == node) return true; if (s.job.kind != .none and s.job.node == node) return true; - for (s.slots) |slot| if (slot.used and slot.req.node == node) return true; + // By pointer: by value copied every slot, park data and all + // (8 MiB at the default capacity), onto the caller's stack. + for (&s.slots) |*slot| if (slot.used and slot.req.node == node) return true; return false; } |
