WIP: [pr-feature][memory] DARNER_TILE_HEAP_MB: a smaller Series X streaming heap (off by default) #11
Loading…
Reference in a new issue
No description provided.
Delete branch "Jesper-A/Darner:pr5-tile-heap"
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?
Re-filed from CodeFloe #326 (the CodeFloe repo is gone; nothing was migrated). Same branch and commit.
Base: the branch is on
f2bccf656, themaincommit it was cut from.mainis nowdd2f061d5. Not rebased (we rebase only if you ask). A text-only trial merge (git merge-tree --write-tree trustno1/main pr5-tile-heap) conflicts inREADME.mdandapps/darner/src/heap_budget.rs(mainchanged that file inf3080a50a, Series S 3840x2160 output);apps/darner/src/run.rsmerges cleanly.Contributor role (optional)
What it changes
Series X asks for a 6,236 MiB streaming (tile) heap at start. All title memory is pinned RAM here, so a PC with 16 GB of RAM is left with little free.
New:
DARNER_TILE_HEAP_MB(1024 to 6236; not set = the title's own size) replaces the size in the one instruction that loads it. It is fitted intoapps/darner/src/heap_budget.rslike the render-target heap and the scene pool: the retail build and the stock bytes are checked first, other builds are refused with a log line, and the patched image gets its own folder (tileheap<MB>). Below 1024 the title stops in System Init (as the author found). Off by default; a README row is added.Credit: port of lobomfz/VIctory-xmem PR #264 (author Simo), the loader switch only; the fork's
run.shdefault is not ported. That is a PR in the xmem fork, not a Darner number.The author's numbers, theirs and not measured by us (RX 9070 16 GB, Ryzen 7 5700X3D, 16 GB RAM): stock 6236 MiB was killed for lack of memory with 127-151 MB free; 3977 ran through with at least 1,808 MB free and p99 80 ms against 150-238 ms.
Unverified: the stock instruction bytes at +0x24796bc come from the fork. They have not been checked against a real retail image: the test that does so (
shrinks_the_tile_heap) skips itself when no image is given, and it was skipped. If the bytes are wrong, the switch refuses to patch (it checks the stock bytes first), so the expected failure is "refused", not a corrupt image. That has not been shown on a real image either.Spec dependence
How it was tested
23cbdc591on basef2bccf656(not rebased on the currentmain,dd2f061d5).-p darner): 107 passed, 1 ignored. They cover size parsing (floor 1024, ceiling 6236) and the instruction bytes.-p darner): clean with-A clippy::unnecessary_lazy_evaluations -A clippy::manual_is_multiple_of(two lints allowed, not from this change).cargo xtask policy: ok.cargo clippy --workspace --all-targets --locked -- -D warningspending; the same with--all-featurespending;cargo test --workspace --lockedpending. There is no CI upstream, and nothing here claims one.Checklist
main(basef2bccf656).docs/asset-policy.md(cargo xtask policyok).Checked for overlap
DARNER_TILE_HEAP_MB. On 2026-12-03 this host had 3 issues and 5 pull requests in total (#3 by another contributor; #5 to #8 are ours, re-filed today); none is about the streaming heap (issue #1 is about frame generation and texture memory on a 6 GB card, a different allocation). The one open pull request (#3, ray tracing mode in F1) changeshost/menu.rs,host/panel.rsandhwrt.rs: none of this change's files. Our own earlier CodeFloe PR on the Series S output (CodeFloe #313, not migrated) editedheap_budget.rstoo;mainnow has our Series S commitf3080a50a, which changesheap_budget.rsand causes the conflict above.README.md. Different changes; whichever lands first, the others take the new rows when they are rebased.This change was made with AI assistance (Claude Code).