Repository navigation
Reduce long-session serial-history memory and remove global rehashes - #34
Merged
ly05010419 merged 1 commit intoOct 19, 2026
Conversation
ly05010419
added a commit
that referenced
this pull request
Oct 19, 2026
… Chinese memory line (after PR #34) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AZC16EYkS2AmLMgumTJaXJ
ly05010419
added a commit
that referenced
this pull request
Oct 20, 2026
…ultrawide HUD, 1.4.3 survey, mods, controls.txt) into the Breath of the Wild branch Resolved by hand: nvn_mtl.m (PR #34's paged-bitmap serial sets keep the serial forgetting of 635fb31: totk_serial_del clears a bit; the memory line shows both; the BotW frame reset stays in mtl_present), build_app.py (make -j and the per-game launcher defines), the Makefile (the BotW targets and the Opus test), loader.c (the #57 stale-reference handler and 1.4.3's survey return address are TOTK-only: Breath of the Wild has no GAME_ADDR for them), world_survey.c (BotW keeps its stub, with runtime_survey_sync), README (both update-history rows). Found by the merged build: Breath of the Wild lacked runtime_output_size_current (frontend.m's shortcut text) and runtime_survey_sync (hle_nvn.c); and the add-on content file handles shared fs_host.c's 0x200000000 range, so closing a host file at the title ended the game ("close invalid add-on content handle"): they now start at 0x400000000. Tested on the merged binaries: TOTK 1.2.1 jump session (anomalies 0, occlusion normal, serial set 48,606 / 13 pages), Breath of the Wild DLC + key 3 (k3a6) and key 2 (k2c, 11 of 12 pairs within 5 px). Co-Authored-By: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Long TOTK sessions retain every finalized texture serial and every GPU-owned serial. In a 2h52m 1.0.0 session the sets reached 24.37M and 16.70M entries; their hash arrays alone accounted for about 1 GiB, and growth required rehashing all old keys on the submit path.
This replaces only those two membership sets with sparse, exact paged bitmaps. All uint64 serials and historical ownership facts are preserved under the existing mutex; texture-pool following, recording pins, retirement and GPU synchronization retain their existing semantics. Allocating a new page never reinserts previous keys. Periodic diagnostics report actual requested bytes and pages beyond the existing detailed memory-log cap. Storage still grows with occupied serial ranges.
This is independent of #29 and #30: it does not change shader loading, skip draws, limit FPS, or alter resolution/interpolation. Other local translation/prefetch changes are deliberately excluded to keep this review separate from the existing async-loading work.
Validation on current main c5ac270:
Supporting local integration evidence: the 1.0.0 packaged runtime passed the texture-retirement GPU probe (35,021 checks), UBSan, and a short scene/movement check using a save copy. That runtime also contains other local shader fixes, so these checks are not represented as an isolated performance benchmark of this branch. No long-session memory plateau is claimed; ASan could not initialize on the local macOS 27.2 host. Details: docs/serial-history.md.