perf(fspy): use sparse Windows shared memory#524
Draft
wan9chi wants to merge 17 commits into
Draft
Conversation
This was referenced Jul 9, 2026
Member
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jul 9, 2026
42992a3 to
fcc530f
Compare
fcc530f to
5d1ba2f
Compare
51f4393 to
adc5221
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: adc5221ce4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
adc5221 to
39b502d
Compare
379cedd to
67534d3
Compare
39b502d to
29bdc15
Compare
29bdc15 to
9bcba8e
Compare
62be316 to
283d922
Compare
3f7527b to
a6a417e
Compare
283d922 to
6691051
Compare
1161f5b to
ddfb5f3
Compare
3994daf to
aa6b57e
Compare
ddfb5f3 to
13bda67
Compare
13bda67 to
45c8d2f
Compare
45c8d2f to
6dfcf16
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5.6 <gpt-5.6@openai.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-authored-by: GPT-5 Codex <codex@openai.com>
6dfcf16 to
0710119
Compare
Co-authored-by: GPT-5 Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
Avoid allocating a fully backed temporary file for each tracked Windows task while keeping file-access recording on the shared-memory fast path.
Background
The Windows adapter relied on
shared_memoryfor mapping creation, naming, and cleanup. Owning the native mapping lets fspy share it by kernel object name, keep sender opens independent of the temporary directory, and mark the backing file sparse.Windows may write dirty mapped pages under memory pressure. Record writers still use atomics and pointer writes without a file or IPC system call for each record.
Changes
shared_memoryadapter with a smallwindows-sysimplementation and an owned mapped-view guard.TMP,TEMP, or working directory.windows-sysimports forLocalFreeandPathAllocCombine, replacing linker inputs that the removed dependency supplied.