Skip to content

fix(victory-gpu): clear stale same-kind subranges in titlemem and add tests - #419

Closed
Lewandox wants to merge 1 commit into
LooperSalty:mainfrom
Lewandox:fix/titlemem-cleanup-overlapping-ranges
Closed

Lewandox wants to merge 1 commit into
LooperSalty:mainfrom
Lewandox:fix/titlemem-cleanup-overlapping-ranges

Conversation

@Lewandox

Copy link
Copy Markdown
Collaborator

Summary

Improves memory range hygiene and adds unit test coverage in third_party/victory/crates/victory-gpu/src/titlemem.rs:

  1. Avoid stale overlapping entries when ranges are replaced:
    • When title_range inserts [base, base + size), any previously tracked range that started inside (base, base + size) from an earlier allocation at the same region is cleared so RANGES cannot accumulate stale sub-ranges.
    • title_range with size == 0 removes any stale entry at base instead of leaving it behind.
  2. Unit tests:
    • Adds unit tests for title_range, title_range_free, forget_if_stale (verifying only VIRTUAL ranges are removed), snapshot ordering, and overlapping-entry cleanup.

Verification

  • cargo test -p victory-gpu --lib titlemem::tests (default and --features diagnostics)
  • cargo xtask policy inside third_party/victory

@Lewandox

Copy link
Copy Markdown
Collaborator Author

Closing as obsolete after #409 (\ itlemem.rs\ was removed in the combined base). Keeping the PR queue clean.

@Lewandox Lewandox closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant