runtime: distinguish copy-on-write pages in memory queries #197
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/200"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T18:20:16Z.
Change
Add a two-page copy-on-write experiment to the Windows
desktop_memory_querytest. It creates a writable view and a copy view of the same pagefile-backed section. It checks mapping type, working-set sharing and which writes are visible in each view.Verification
Commit
5c661faond1f7c33, Windows x64 build 26200, MSVC 19.44.35230, Debug. Page size was 4,096 bytes.All five selected cases passed with zero skips. The standalone repeat passed twenty consecutive times. Before the private write, the copy view showed two resident shared pages. After the write, both views still reported
MEM_MAPPED. The working-set query identified the modified page in the copy view as private. The adjacent page and both pages in the writable view remained shared. The marker on the private page stayed isolated. On the adjacent page a write to the shared view appeared in the copy.For the negative control I initially opened the second view with
FILE_MAP_WRITEand ranctest --preset dev --no-tests=error -R '^desktop_memory_query$' -V. The assertion failed as expected withMapped page 0: resident=1 shared=1 expected_shared=0. Replacing that flag withFILE_MAP_COPYproduced the result above.Evidence and follow-up
Original MIT-licensed C++ fixture. Both views belong to the test process and use anonymous pagefile backing. Each working-set observation locks the two requested pages, checks the returned validity bit for each and then interprets its sharing bit. This measures desktop Windows copy-on-write behavior. Windows memory query documentation
This contribution was AI-assisted.
Checklist
docs/experiments.md.Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T18:20:34Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
5c661faℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.