runtime: define the physical-page allocation contract for startup #873

Closed
opened 2026-11-23 15:24:54 +00:00 by R0Y00 · 10 comments
R0Y00 commented 2026-11-23 15:24:54 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T15:24:54Z.


Refs #870 and #875. After binding the default allocator, the startup mapping probe reached XMemAllocatePhysicalPages. The next slice is to verify the ABI and lifetime of the physical-page allocation and release pair.

Acceptance

  • Establish argument widths, return semantics, output fields, page-count units, and matching release using shareable evidence or an independently reproducible fixture.
  • Record the expected behavior for a valid allocation, failure, and cleanup. Add a source-built control that can detect incorrect ownership or page-count handling.
  • Treat mapping, scatter mapping and transfer as follow-ups with their own evidence. Link #870 with the tested behavior and remaining contract questions.

Available to claim. Comment with the environment you can test and links to related GPU VA work. Keep local inputs and raw logs off the tracker.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6562629288 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/880). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T15:24:54Z. --- Refs #870 and #875. After binding the default allocator, the startup mapping probe reached `XMemAllocatePhysicalPages`. The next slice is to verify the ABI and lifetime of the physical-page allocation and release pair. **Acceptance** - Establish argument widths, return semantics, output fields, page-count units, and matching release using shareable evidence or an independently reproducible fixture. - Record the expected behavior for a valid allocation, failure, and cleanup. Add a source-built control that can detect incorrect ownership or page-count handling. - Treat mapping, scatter mapping and transfer as follow-ups with their own evidence. Link #870 with the tested behavior and remaining contract questions. Available to claim. Comment with the environment you can test and links to related GPU VA work. Keep local inputs and raw logs off the tracker.
R0Y00 commented 2026-11-24 06:49:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T15:30:19Z.


The public Microsoft GDK DirectStorage overview identifies one consumer of arrays of 64 KiB physical pages returned by this allocation path. That supports a 64 KiB case for a source-built fixture. It does not establish the declaration, output-array layout, other supported page sizes, or the release call. Those are still the open items. Please link evidence for the pair and include a failure/cleanup check before proposing shim behavior.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7105670201 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/880#issuecomment-7105670201). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T15:30:19Z. --- The public [Microsoft GDK DirectStorage overview](https://learn.microsoft.com/en-us/gaming/gdk/docs/features/console/storage/directstorage/directstorage-overview?view=gdk-2604) identifies one consumer of arrays of 64 KiB physical pages returned by this allocation path. That supports a 64 KiB case for a source-built fixture. It does not establish the declaration, output-array layout, other supported page sizes, or the release call. Those are still the open items. Please link evidence for the pair and include a failure/cleanup check before proposing shim behavior.
rasptum commented 2026-11-24 06:49:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-23T15:37:10Z.


Claiming this.

  • Milestone: #870, reaching the next startup import after the default allocator.
  • Interface: desktop xmem.dll exports XMemAllocatePhysicalPages and XMemFreePhysicalPages (src/xmem_shim.cpp/.def), backed by a new page-number registry. Stacked on #879, which owns the same files.
  • Evidence for the pair (MIT, Microsoft, pinned at b1e77b6):
    • AdvancedESRAM/PageAllocator.cpp L197–232: BOOL XMemAllocatePhysicalPages(MEM_64K_PAGES, &count, pagePtr) with a ULONG_PTR count and a PULONG_PTR page array. Release is XMemFreePhysicalPages(count, pagePtr) with the same count and array.
    • AMDFidelityFX_FSR3FrameInterpolation/FSR3FrameInterpolation.cpp L146–167: the flag argument is cast to ULONG_PTR (XMEM_2MB_CLUSTERS or MEM_64K_PAGES). The count is in/out, and the caller asserts it comes back unchanged. XMemFreePhysicalPages returns BOOL.
    • SlimEra kernelx.cpp (MIT) implements the kernelx-level AllocateTitlePhysicalPages/FreeTitlePhysicalPages. They return 64 KiB page indices and set *NumberOfPages = 0 with ERROR_INVALID_PARAMETER on bad flags.
  • Plan: accept only MEM_64K_PAGES (the 64 KiB case from the DirectStorage note above) and allocate all or nothing. Fail closed, returning FALSE, *count = 0 and the array untouched, on unknown flags or upper bits, a null pointer, a zero count, or a count above the desktop capacity. Release must name whole live grants. Negative controls: a short or long count on release, a double free, never-issued or forged page numbers, and duplicate entries are each refused with no state change. Forced exhaustion is followed by cleanup. Mapping, scatter mapping and transfer stay out.
  • Environment: Windows 10 Pro 10.0.19045, MSVC VS2022 x64, dev and release presets.
  • Related: #875/#879 (default pair), #126/#134 (era_heap attribute word; physical memory types still refused there), #874 (D3D12 VA startup contract, GPU VA side).

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7105847780 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/880#issuecomment-7105847780). Originally posted by [rasptum](https://github.com/rasptum) on 2026-11-23T15:37:10Z. --- Claiming this. - **Milestone:** #870, reaching the next startup import after the default allocator. - **Interface:** desktop `xmem.dll` exports `XMemAllocatePhysicalPages` and `XMemFreePhysicalPages` (`src/xmem_shim.cpp`/`.def`), backed by a new page-number registry. Stacked on #879, which owns the same files. - **Evidence for the pair** (MIT, Microsoft, pinned at `b1e77b6`): - [`AdvancedESRAM/PageAllocator.cpp` L197–232](https://github.com/microsoft/Xbox-GDK-Samples/blob/b1e77b6ac10f95b07296025fda171ca2ddc42dbe/Samples/Graphics/AdvancedESRAM/PageAllocator.cpp#L197-L232): `BOOL XMemAllocatePhysicalPages(MEM_64K_PAGES, &count, pagePtr)` with a `ULONG_PTR` count and a `PULONG_PTR` page array. Release is `XMemFreePhysicalPages(count, pagePtr)` with the same count and array. - [`AMDFidelityFX_FSR3FrameInterpolation/FSR3FrameInterpolation.cpp` L146–167](https://github.com/microsoft/Xbox-GDK-Samples/blob/b1e77b6ac10f95b07296025fda171ca2ddc42dbe/Samples/Graphics/AMDFidelityFX_FSR3FrameInterpolation/FSR3FrameInterpolation.cpp#L146-L167): the flag argument is cast to `ULONG_PTR` (`XMEM_2MB_CLUSTERS` or `MEM_64K_PAGES`). The count is in/out, and the caller asserts it comes back unchanged. `XMemFreePhysicalPages` returns `BOOL`. - SlimEra `kernelx.cpp` (MIT) implements the kernelx-level `AllocateTitlePhysicalPages`/`FreeTitlePhysicalPages`. They return 64 KiB page indices and set `*NumberOfPages = 0` with `ERROR_INVALID_PARAMETER` on bad flags. - **Plan:** accept only `MEM_64K_PAGES` (the 64 KiB case from the DirectStorage note above) and allocate all or nothing. Fail closed, returning `FALSE`, `*count = 0` and the array untouched, on unknown flags or upper bits, a null pointer, a zero count, or a count above the desktop capacity. Release must name whole live grants. Negative controls: a short or long count on release, a double free, never-issued or forged page numbers, and duplicate entries are each refused with no state change. Forced exhaustion is followed by cleanup. Mapping, scatter mapping and transfer stay out. - **Environment:** Windows 10 Pro 10.0.19045, MSVC VS2022 x64, `dev` and `release` presets. - **Related:** #875/#879 (default pair), #126/#134 (`era_heap` attribute word; physical memory types still refused there), #874 (D3D12 VA startup contract, GPU VA side). AI-assisted (Claude Code).
R0Y00 commented 2026-11-24 06:49:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T15:41:13Z.


Thanks for taking this and for the two pinned Microsoft samples. I checked the calls: they establish the 64 KiB allocate/free pairing, the in/out count and page array, and use a Boolean success check. The examples do not settle count/array mutation on failure or whether partial release is permitted. Keep those cases explicitly labelled as proposed desktop policies until there is independent evidence.

Please take the independent source-built comparison and negative controls first. Startup integration is already being checked, so coordinate here before adding another implementation in the XMem shim. A fixture that checks real page lifetime, preserves a canary on refusal, then confirms that a valid release still succeeds would be directly reusable.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7105952032 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/880#issuecomment-7105952032). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T15:41:13Z. --- Thanks for taking this and for the two pinned Microsoft samples. I checked the calls: they establish the 64 KiB allocate/free pairing, the in/out count and page array, and use a Boolean success check. The examples do not settle count/array mutation on failure or whether partial release is permitted. Keep those cases explicitly labelled as proposed desktop policies until there is independent evidence. Please take the independent source-built comparison and negative controls first. Startup integration is already being checked, so coordinate here before adding another implementation in the XMem shim. A fixture that checks real page lifetime, preserves a canary on refusal, then confirms that a valid release still succeeds would be directly reusable.
triggered02 commented 2026-11-24 06:49:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-23T15:48:02Z.


Independent source-built evidence, not a claim. rasptum owns #880.

I built an independent fixture in parallel before seeing the claim. It is uploaded at triggered02/Xbox2Windows: xmem-physical-pages (commits 7dcc36d and 3d206a1, on top of the now-merged #879). I am not opening a competing shim PR.

The reusable part is the source-built comparison, not the local shim policy:

  • cpu_xmem_physical.exe imports XMemAllocatePhysicalPages and XMemFreePhysicalPages by name from the desktop xmem.dll. The same EXE runs under the Windows loader and pe_map, and the exits match.
  • Valid 64 KiB allocate/free, in/out count unchanged, distinct nonzero PFNs.
  • Refusals for a null count, a null array, a large-page count that is not a multiple of 32, and a count above the desktop cap. The PFN array is pre-filled with canaries and must be unchanged on refusal.
  • Double free, unknown PFN and duplicate PFN are refused. The unit scenario confirms a valid release still succeeds after a refusal.
  • The missing-provider control fails before entry on the first xmem import in table order.
  • Dev and Release: 6/6 focused tests pass, including cpu_native_xmem_physical; the existing cpu_native_shim_startup passes in Release.

The fixture checks registry lifetime and cleanup, not mapped-page lifetime; mapping, scatter mapping and transfer remain out of scope. I can rebase the fixture and canary checks onto rasptum's implementation after it lands, or hand over the MASM/Python check. The local shim in the branch is only what proved the import can be passed.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7106127383 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/880#issuecomment-7106127383). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-23T15:48:02Z. --- Independent source-built evidence, not a claim. rasptum owns #880. I built an independent fixture in parallel before seeing the claim. It is uploaded at `triggered02/Xbox2Windows: xmem-physical-pages` (commits 7dcc36d and 3d206a1, on top of the now-merged #879). I am not opening a competing shim PR. The reusable part is the source-built comparison, not the local shim policy: - `cpu_xmem_physical.exe` imports `XMemAllocatePhysicalPages` and `XMemFreePhysicalPages` by name from the desktop `xmem.dll`. The same EXE runs under the Windows loader and `pe_map`, and the exits match. - Valid 64 KiB allocate/free, in/out count unchanged, distinct nonzero PFNs. - Refusals for a null count, a null array, a large-page count that is not a multiple of 32, and a count above the desktop cap. The PFN array is pre-filled with canaries and must be unchanged on refusal. - Double free, unknown PFN and duplicate PFN are refused. The unit scenario confirms a valid release still succeeds after a refusal. - The missing-provider control fails before entry on the first xmem import in table order. - Dev and Release: 6/6 focused tests pass, including `cpu_native_xmem_physical`; the existing `cpu_native_shim_startup` passes in Release. The fixture checks registry lifetime and cleanup, not mapped-page lifetime; mapping, scatter mapping and transfer remain out of scope. I can rebase the fixture and canary checks onto rasptum's implementation after it lands, or hand over the MASM/Python check. The local shim in the branch is only what proved the import can be passed. AI-assisted.
triggered02 commented 2026-11-24 06:49:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-23T15:54:40Z.


Opened draft #887 with the fixture and negative controls described above. It is explicitly not a competing implementation; I will reduce it to the fixture and canary checks once rasptum's #880 implementation lands, or close it in favour of theirs.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7106308050 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/880#issuecomment-7106308050). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-23T15:54:40Z. --- Opened draft #887 with the fixture and negative controls described above. It is explicitly not a competing implementation; I will reduce it to the fixture and canary checks once rasptum's #880 implementation lands, or close it in favour of theirs.
rasptum commented 2026-11-24 06:49:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-23T16:14:58Z.


Result: #892.

Tested: commit 729bfa1 on origin/main 406e14a. Windows 10 Pro 10.0.19045.6466, MSVC 19.44.35207.1 x64. Synthetic inputs only.

Source-built comparison first:

  • cpu_native_xmem_physical_pair: an EXE that imports the pair by name gives 0x880 under both the Windows loader and pe_map_run. The full_count and skip_release mutations give 0xf04 and 0xf06 under both. A provider missing either export stops the mapping before entry.
  • era_physical_controls: short count, long count, a single page of a grant, double free, never-issued page, forged mix and duplicate entry are each refused by the policy with state unchanged, and accepted by a lenient SlimEra-style release.
  • xmem_shim_physical_pages checks canaries on refusal and that a valid release still succeeds after refusals. It also covers exhaustion with cleanup.
  • dev and release: 19/19 each, including the existing era_heap, desktop_memory_query and xmem_shim sets.

Established by the Microsoft samples: 64 KiB allocate/free pairing, the in/out count with a page array, and the BOOL success check.

Proposed desktop policy (labeled in code and docs): MEM_64K_PAGES only, all or nothing, *count = 0 and an untouched array on failure, release of whole live grants only.

Open contract questions:

  • Flag width (ULONG_PTR vs DWORD).
  • The value of XMEM_2MB_CLUSTERS and its count units.
  • Count and array state on failure, and partial grants.
  • What page numbers encode, and whether partial release is allowed.
  • Console error codes and the physical-page budget.

The EXE comparison follows @triggered02's independent fixture (credited in the PR, with Co-authored-by). Their observation, not mine: with both pairs bound, their local binding probe moved the first unresolved import to xmem.dll!XMemIsToolsMemAvailable.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7106841153 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/880#issuecomment-7106841153). Originally posted by [rasptum](https://github.com/rasptum) on 2026-11-23T16:14:58Z. --- Result: #892. **Tested:** commit `729bfa1` on `origin/main` `406e14a`. Windows 10 Pro 10.0.19045.6466, MSVC 19.44.35207.1 x64. Synthetic inputs only. **Source-built comparison first:** - `cpu_native_xmem_physical_pair`: an EXE that imports the pair by name gives `0x880` under both the Windows loader and `pe_map_run`. The `full_count` and `skip_release` mutations give `0xf04` and `0xf06` under both. A provider missing either export stops the mapping before entry. - `era_physical_controls`: short count, long count, a single page of a grant, double free, never-issued page, forged mix and duplicate entry are each refused by the policy with state unchanged, and accepted by a lenient SlimEra-style release. - `xmem_shim_physical_pages` checks canaries on refusal and that a valid release still succeeds after refusals. It also covers exhaustion with cleanup. - dev and release: 19/19 each, including the existing `era_heap`, `desktop_memory_query` and `xmem_shim` sets. **Established by the Microsoft samples:** 64 KiB allocate/free pairing, the in/out count with a page array, and the `BOOL` success check. **Proposed desktop policy (labeled in code and docs):** `MEM_64K_PAGES` only, all or nothing, `*count = 0` and an untouched array on failure, release of whole live grants only. **Open contract questions:** - Flag width (`ULONG_PTR` vs `DWORD`). - The value of `XMEM_2MB_CLUSTERS` and its count units. - Count and array state on failure, and partial grants. - What page numbers encode, and whether partial release is allowed. - Console error codes and the physical-page budget. The EXE comparison follows @triggered02's independent fixture (credited in the PR, with Co-authored-by). **Their observation, not mine:** with both pairs bound, their local binding probe moved the first unresolved import to `xmem.dll!XMemIsToolsMemAvailable`. AI-assisted (Claude Code).
thegl0w commented 2026-11-24 06:49:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by thegl0w on 2026-11-23T16:19:04Z.


AI-generated: this comment was written by Claude (Claude Code), an AI assistant, and posted with the account owner's approval.

I'd like to take the mapping follow-up that #880 leaves open: XMemMapPhysicalPages, XMemMapPhysicalPagesScatter and XMemTransferMemory. It sits where our earlier memory work meets GPU addresses (#183, #268, #284, #327). With #892, mapping is likely the next boundary after the physical-page pair.

Static pass on the package's main executable (file reads only, nothing executed; numbers only, nothing from the image is shared):

Import Call sites Observed argument shape
XMemMapPhysicalPages 12 Three register arguments at every site: RCX an address (register or stack local), RDX a count, R8 a pointer. One site builds R8 as base + index * 8, consistent with an array of 8-byte page numbers.
XMemMapPhysicalPagesScatter 2 One site passes RCX = a static address and R8 = 0 (a null page array, possibly an unmap form). The other passes a register address, a 32-bit count in EDX and a pointer in R8.
XMemTransferMemory 1 ECX = 1; EDX = 0x1000000 (16 MiB) or another value selected by a conditional move.

These are observations only. Argument meanings, return values and failure behavior aren't established yet.

Plan, following the evidence-first order used for #874 and #880:

  1. Contract note: argument widths, return semantics and the order relative to XMemVirtualAlloc and the physical-page pair. Only from evidence that can be shared or reproduced.

  2. Source-built EXE with a recording provider: imports the three names, records the inputs and both outcomes, and shows what the caller does next, under the Windows loader and pe_map. No production xmem.dll change in this step.

  3. Then a desktop implementation proposal, stacked on #892. The direction I'd like to evaluate:

    • physical pages as views of a pagefile-backed section;
    • the title's reservation as a placeholder (VirtualAlloc2 with MEM_RESERVE_PLACEHOLDER);
    • mapping with MapViewOfFile3 (MEM_REPLACE_PLACEHOLDER), so a scatter mapping is several views of the same pages;
    • graphics ranges tracked in era_title_gpu (#327), so they get desktop GPU addresses.

    This depends on how #888 reserves address space, so @descent81 and I should agree on the reservation type first. The page numbers would come from #892's registry (@rasptum).

Environment: Windows 11 Pro 26300, MSVC 19.44 x64, CMake/Ninja (dev and release presets), NVIDIA GeForce RTX 3070 Laptop GPU and WARP, D3D12 debug layer available.

Executables, dumps and raw logs stay local.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7106947459 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/880#issuecomment-7106947459). Originally posted by [thegl0w](https://github.com/thegl0w) on 2026-11-23T16:19:04Z. --- > **AI-generated:** this comment was written by Claude (Claude Code), an AI assistant, and posted with the account owner's approval. I'd like to take the mapping follow-up that #880 leaves open: `XMemMapPhysicalPages`, `XMemMapPhysicalPagesScatter` and `XMemTransferMemory`. It sits where our earlier memory work meets GPU addresses (#183, #268, #284, #327). With #892, mapping is likely the next boundary after the physical-page pair. **Static pass on the package's main executable** (file reads only, nothing executed; numbers only, nothing from the image is shared): | Import | Call sites | Observed argument shape | |---|---|---| | `XMemMapPhysicalPages` | 12 | Three register arguments at every site: RCX an address (register or stack local), RDX a count, R8 a pointer. One site builds R8 as `base + index * 8`, consistent with an array of 8-byte page numbers. | | `XMemMapPhysicalPagesScatter` | 2 | One site passes RCX = a static address and R8 = 0 (a null page array, possibly an unmap form). The other passes a register address, a 32-bit count in EDX and a pointer in R8. | | `XMemTransferMemory` | 1 | ECX = 1; EDX = 0x1000000 (16 MiB) or another value selected by a conditional move. | These are observations only. Argument meanings, return values and failure behavior aren't established yet. **Plan,** following the evidence-first order used for #874 and #880: 1. **Contract note:** argument widths, return semantics and the order relative to `XMemVirtualAlloc` and the physical-page pair. Only from evidence that can be shared or reproduced. 2. **Source-built EXE with a recording provider:** imports the three names, records the inputs and both outcomes, and shows what the caller does next, under the Windows loader and `pe_map`. No production `xmem.dll` change in this step. 3. **Then a desktop implementation proposal,** stacked on #892. The direction I'd like to evaluate: - physical pages as views of a pagefile-backed section; - the title's reservation as a placeholder (`VirtualAlloc2` with `MEM_RESERVE_PLACEHOLDER`); - mapping with `MapViewOfFile3` (`MEM_REPLACE_PLACEHOLDER`), so a scatter mapping is several views of the same pages; - graphics ranges tracked in `era_title_gpu` (#327), so they get desktop GPU addresses. This depends on how #888 reserves address space, so @descent81 and I should agree on the reservation type first. The page numbers would come from #892's registry (@rasptum). **Environment:** Windows 11 Pro 26300, MSVC 19.44 x64, CMake/Ninja (`dev` and `release` presets), NVIDIA GeForce RTX 3070 Laptop GPU and WARP, D3D12 debug layer available. Executables, dumps and raw logs stay local.
rasptum commented 2026-11-24 06:49:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by rasptum on 2026-11-23T16:38:11Z.


Coordination note on the overlap between #892 and #901. Both edit src/xmem_shim.cpp/.def and both reference this issue.

Suggested split, following the claims already on #870/#880:

  • #892: the allocate/free pair only (this issue's scope). It has R0Y00's review commit d0bf29a on it.
  • Mapping (XMemMapPhysicalPages, ...Scatter, XMemTransferMemory): thegl0w claimed the follow-up here at 16:19Z, and R0Y00's #901 review (shared backing through unmap/remap, rejecting unowned tokens, validating the whole list before release) applies to that part.
  • XMemVirtualAlloc: descent81's #888.
  • XMemIsToolsMemAvailable: Holastor's #896 is the single landing PR (R0Y00, 16:34Z on #870, after triggered02 consolidated #900 into it).

@stan495 would you be open to rebasing #901 onto #892 once it lands and reducing it to whatever isn't covered above, or pairing with thegl0w on the mapping slice? If you'd rather #901 carry the allocate/free pair instead, I'm fine folding #892's fixture and controls into yours with credit. Either way, one PR per piece keeps review simple.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7107440484 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/880#issuecomment-7107440484). Originally posted by [rasptum](https://github.com/rasptum) on 2026-11-23T16:38:11Z. --- Coordination note on the overlap between #892 and #901. Both edit `src/xmem_shim.cpp`/`.def` and both reference this issue. Suggested split, following the claims already on #870/#880: - **#892:** the allocate/free pair only (this issue's scope). It has R0Y00's review commit `d0bf29a` on it. - **Mapping** (`XMemMapPhysicalPages`, `...Scatter`, `XMemTransferMemory`): thegl0w claimed the follow-up here at 16:19Z, and R0Y00's #901 review (shared backing through unmap/remap, rejecting unowned tokens, validating the whole list before release) applies to that part. - **`XMemVirtualAlloc`:** descent81's #888. - **`XMemIsToolsMemAvailable`:** Holastor's #896 is the single landing PR (R0Y00, 16:34Z on #870, after triggered02 consolidated #900 into it). @stan495 would you be open to rebasing #901 onto #892 once it lands and reducing it to whatever isn't covered above, or pairing with thegl0w on the mapping slice? If you'd rather #901 carry the allocate/free pair instead, I'm fine folding #892's fixture and controls into yours with credit. Either way, one PR per piece keeps review simple. AI-assisted (Claude Code).
R0Y00 commented 2026-11-24 06:49:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T16:43:32Z.


Completed by #892 (merged at 3dfe3a9). The bounded desktop registry implements the named allocation and matching release pair for 64 KiB page identifiers. The same source-built EXE passed under Windows and pe_map. Ownership, count, canary, missing-export and cleanup controls passed, and both Windows CI builds were green. These are bookkeeping identifiers. Shared backing, mapping/scatter, transfer and reservation semantics remain separate work under #870, #901 and #888.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7107575686 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/880#issuecomment-7107575686). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T16:43:32Z. --- Completed by #892 (merged at 3dfe3a9). The bounded desktop registry implements the named allocation and matching release pair for 64 KiB page identifiers. The same source-built EXE passed under Windows and pe_map. Ownership, count, canary, missing-export and cleanup controls passed, and both Windows CI builds were green. These are bookkeeping identifiers. Shared backing, mapping/scatter, transfer and reservation semantics remain separate work under #870, #901 and #888.
stan495 commented 2026-11-24 06:49:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-23T16:44:57Z.


Thanks @rasptum for the heads-up.

I've already closed #901, so please feel free to proceed with #892 for the allocate/free pair. Leaving the mapping slice to @thegl0w sounds good to me as well. Thanks!

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7107611076 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/880#issuecomment-7107611076). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T16:44:57Z. --- Thanks @rasptum for the heads-up. I've already closed #901, so please feel free to proceed with #892 for the allocate/free pair. Leaving the mapping slice to @thegl0w sounds good to me as well. Thanks!
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#873
No description provided.