Handle the full ERA attribute word in era_heap on the desktop #134
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!134
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/134/head"
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?
@thegl0w on GitHub · 2026-11-21 16:49 UTC · original
thegl0w:era-heap-full-attributes→main· +247 −34 · 6 files · 1 commits · merged 2026-11-21 17:57 UTCRefs #126
This PR covers desktop handling of the two recorded attribute words. It does not settle their Scarlett semantics, which stay open in #126.
Desktop handling (measured)
era_heapused to accept only the alignment field and returned null for both words recorded at the Bink and AMDXMemAlloccall sites. It now splits the word with SlimEra's Xbox One ERA layout: object type 0–13, page size 14–15, allocator ID 16–23, log2 alignment 24–28, memory type 29–32, reserved 33–63.VirtualAlloc(MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE)region on the allocation granularity. This is ordinary CPU-visible memory; no GPU mapping or caching is modeled.release(void*)keeps its heap-only signature and behavior, so existing callers such asera_heap_reuse'sunique_ptr<void, decltype(&era_heap::release)>are unchanged. The newrelease_with_attributes(void*, attributes)frees by attribute word, asXMemFreecallers do.Unconfirmed on Scarlett
0xe5.Tests
era_heap_observed_words(desktop handling):VirtualQueryreportsMEM_FREEafterrelease_with_attributes;era_heap_failure: reworked for the new policy. Each reserved bit is tried with a heap alignment and with the AMD word, along with types 7–15, page size 3, 4 MB graphics pages, a 128 KiB graphics alignment, zero size and excessive size.era_heap_caller_layout: its Bink-style storage now uses the recorded Bink word.era_heap_reuse(from main) is unchanged and passes.Mutation check: each deliberately broken variant failed at least one case.
observed_words.failure.allocationandcaller_layout.Rebased on
mainat583fee5. Windows 11 build 26300, MSVC 19.44.35229, CMake 4.4.4, dev preset (Debug):Outputs:
era_heap_observed_wordsprintsbink_blocks=2 amd_blocks=4 granularity=65536, andera_heap_reuseprintsreuse_cases=9 recycled_address=9.src/era_heap.cppalso compiles cleanly with/W4 /WX /permissive-.Full CI-equivalent run (
cmake --build --preset dev, thenctest --preset dev --no-tests=error -E '_hardware$', with therequirements-dev.txtenvironment):bvh_wave64_warp,wave_shuffle_warpmainThe one extra test is
era_heap_observed_words.🤖 Generated with Claude Code
github-bot referenced this pull request2026-11-26 21:30:56 +00:00
github-bot referenced this pull request2026-11-26 21:32:43 +00:00
@R0Y00 on GitHub · 2026-11-21 17:17 UTC · original
Please resolve the conflict with main and keep #126 open for the unresolved Scarlett semantics. Please use Refs #126 and distinguish desktop handling of the observed words from confirmed allocator-ID and GPU-visibility behavior.