The Windows heap by a switch (VICTORY_ALLOCATOR=system; unset: mimalloc, as before) #4532
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4532
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4531"
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?
@AS-AI-DEV on GitHub · 2026-11-30 22:00 UTC · original
AS-AI-DEV:allocator-switch→main· +113 −1 · 2 files · 1 commits · openWhat it changes
Since v2026.11.30.01 (#1487) mimalloc is the allocator of the layer's Rust code on every PC. It saves heap time on the submitting thread and costs private memory. On a PC short of RAM that trade can go the wrong way, and there is no way to choose.
This adds
VICTORY_ALLOCATOR=system: the layer's Rust code uses the Windows heap. Unset, mimalloc is used exactly as now.crates/victory-gpu/src/heap.rs: aGlobalAllocthat passes each call to mimalloc or tostd::alloc::System. The choice is made once, at the first allocation, and never changes, so every block is released to the allocator that made it.GetEnvironmentVariableAinto a stack buffer, because the allocator cannot allocate to read its own switch. Other targets keep mimalloc.crates/victory-gpu/src/lib.rs: the global allocator is that type. Diagnostics builds keep their counting allocator, untouched.How it was tested
e1251c3, 2 starts: 25.2-25.8 GB; lowest free RAM 5.5-5.6 GB.VICTORY_ALLOCATOR=system),e1251c3, 2 starts: 24.0-24.3 GB; lowest free RAM 5.9-6.1 GB.c71899d, standing starts: 25.0-25.7 GB against 23.7-24.3 GB.e1251c3landed in different views, so I do not quote fps from them. My walking comparison is older: on41adb55with mimalloc 0.1.48 as an opt-in, a fixed walking route, 3 alternated runs a side: without mimalloc 20.3 / 17.7 / 16.4 fps at about 7,000 / 9,000 / 10,000 draws against 18.2 / 17.2 / 14.9 with it, the submitting thread 41.7 against 42.8 ms, private memory 24.9-25.9 against 26.4-26.9 GB.e1251c3went from 25.1 to 30.8 GB private and free RAM fell to 0.5 GB.cargo testpassed for the crates it touches: yes (victory-gpu, with the new test).cargo clippy -p victory-gpu --all-targetswith and without--all-featuresreports nothing in the lines this adds (it stops at two lints that are on main already).Checked for overlap
🤖 Generated with Claude Code
8c9e69f9feto79f1198585View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.