runtime: reserve XMem address space as mappable placeholders #945

Manually merged
github merged 1 commit from gh-pr/945/head into gh-pr/945/base 2026-11-26 22:30:11 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-23 18:13 UTC · original
R0Y00:codex/xmem-placeholder-reservations → main · +90 −4 · 5 files · 1 commits · merged 2026-11-23 18:27 UTC

Refs #870 and #888. This applies the reserve-only profile and source-built validation approach proposed by @⁠descent81 in #888 to the shared backing that landed in #934.

Reserve Windows placeholders without committing memory. Split a page from an owned reservation only when mapping needs it, and coalesce the range after the last view is removed. Preserve the page's contents across unmap/remap and leave caller-provided standalone placeholders supported.

The Windows fixture covers both reservation sizes, maps an interior page, checks the original value after remapping, releases the full range and recreates the same range at the same address. The verified profile covers only the two reserve-only shapes.

ctest --preset release --no-tests=error -R '^xmem_shim_(mapped_pages|physical_pages|exports|tools_memory)$' --output-on-failure

Windows x64, MSVC 19.51, 4/4 passed.

**@⁠R0Y00** on GitHub · 2026-11-23 18:13 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/945) `R0Y00:codex/xmem-placeholder-reservations` → `main` · +90 −4 · 5 files · 1 commits · merged 2026-11-23 18:27 UTC Refs #870 and #888. This applies the reserve-only profile and source-built validation approach proposed by @⁠descent81 in #888 to the shared backing that landed in #934. Reserve Windows placeholders without committing memory. Split a page from an owned reservation only when mapping needs it, and coalesce the range after the last view is removed. Preserve the page's contents across unmap/remap and leave caller-provided standalone placeholders supported. The Windows fixture covers both reservation sizes, maps an interior page, checks the original value after remapping, releases the full range and recreates the same range at the same address. The verified profile covers only the two reserve-only shapes. ```powershell ctest --preset release --no-tests=error -R '^xmem_shim_(mapped_pages|physical_pages|exports|tools_memory)$' --output-on-failure ``` Windows x64, MSVC 19.51, 4/4 passed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:30:09 +00:00
github manually merged commit 2e236d9e48 into gh-pr/945/base 2026-11-26 22:30:11 +00:00
Author
Owner

@⁠legacy-code-archaeologist on GitHub · 2026-11-23 18:16 UTC · original

Independent run of 2e236d9 on a second machine: Windows 11 Pro 26100, Intel Core i7-6820HQ, MSVC 19.52, dev preset. The head merges cleanly with main at 1c13def (git merge-tree).

ctest --preset dev --no-tests=error -R '^xmem_shim_(mapped_pages|physical_pages|exports|tools_memory)$' --output-on-failure

Result: 4/4 passed. xmem_shim_mapped_pages reports Aliased writes, scatter order, remap, rollback, and grant lifetime agree. The wider ^xmem_ selection passes 12/12, with no skips.

I did not run the release preset here.

AI-assisted (Claude Code).

**@⁠legacy-code-archaeologist** on GitHub · 2026-11-23 18:16 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/945#issuecomment-7109922676) Independent run of `2e236d9` on a second machine: Windows 11 Pro 26100, Intel Core i7-6820HQ, MSVC 19.52, `dev` preset. The head merges cleanly with `main` at `1c13def` (`git merge-tree`). ```powershell ctest --preset dev --no-tests=error -R '^xmem_shim_(mapped_pages|physical_pages|exports|tools_memory)$' --output-on-failure ``` Result: 4/4 passed. `xmem_shim_mapped_pages` reports `Aliased writes, scatter order, remap, rollback, and grant lifetime agree`. The wider `^xmem_` selection passes 12/12, with no skips. I did not run the `release` preset here. AI-assisted (Claude Code).
This discussion has been locked. Commenting is limited to contributors.
No description provided.