Repository navigation
Conversation
desplmfao
added a commit
to desplmfao/VIctory
that referenced
this pull request
Nov 25, 2026
… fails A pool miss allocated with Vec::with_capacity, which aborts the process when the allocation fails, even while the pool still holds idle buffers (too small to fit, but up to POOL_BYTES plus the largest one). Try the allocation with try_reserve_exact first; when it fails and the pool is not empty, drop the idle buffers and make one last attempt with reserve_exact, which aborts as before if that fails too. Pool hits and successful misses are unchanged. Idea from fxceless/victory-fork#360. Co-Authored-By: avt0m4t48 <56218626+avt0m4t48@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Refs #321.
A CPU snapshot pool miss currently calls
Vec::with_capacityeven when the pool still holds idle buffers of other sizes. If that allocation fails, the process exits without releasing those buffers. Try the exact allocation first. When it fails, clear the idle pool and make one final attempt. Pool hits still reuse the same buffers, and an empty pool takes the direct path.The idle pool owns buffers only after their snapshots have finished. This change is separate from #47's retention cap and #200's admission rules.
I exercised the exact pool code with a test allocator that rejected an 8,396,800-byte request while a reusable 1 MiB allocation was held. Main exited on the rejected request. This branch released the idle buffer and succeeded on its second attempt. The normal pool miss and exact-fit reuse controls passed on both revisions. Windows MSVC GPU test targets type-checked with diagnostics and warnings denied.
The size in #321 is also possible in texture scratch allocation. These checks establish recovery for the snapshot-pool path. The reported game crash and Windows commit-pressure behavior still need runtime confirmation.
AI-assisted using Codex.