Use mimalloc for host allocations #1487
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!1487
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1487"
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?
@FIocker on GitHub · 2026-11-28 20:44 UTC · original
FIocker:contrib/mimalloc→main· +35 −6 · 4 files · 1 commits · merged 2026-11-30 14:12 UTCUses mimalloc for the host allocator and keeps allocation counters in diagnostics builds. This is an independent port of the allocator change from HotScarlett, with attribution in the commit.
In an earlier matched local build, the allocator-only comparison moved the median from 34.9 to 34.1 ms in the 6,500–8,500 draw window on one machine. This is a component result. The rebased branch awaits CI and gameplay validation.
@POMXARK on GitHub · 2026-11-28 21:47 UTC · original
@FIocker — here is a full 20-minute gameplay A/B on Windows 11 (RTX 5080 16 GB, Ryzen 7 5700X 8C/16T, 32 GB RAM, Series X 1440p, DLSS Quality + MFG 4x, release build, matched save & switches):
20-minute A/B (
mimalloc 0.1.52vs Windows system heap)mimalloc)prep 48.8 ms)prep 44.5 ms)-4.3 ms)prep 51.5 ms)prep 59.9 ms)+8.4 ms)prep 64.9 ms)prep 68.5 ms)+3.6 ms)67.4 ms)70.5 ms)steps 28.3 ms)steps 32.6 ms)>100ms(5s bins)Takeaway
1k–4kdraws, before memory pressure),mimallocgave a clean +7.5% FPS / -4.3 ms prep win with 0 errors and clean visuals.mimalloc's default per-thread segment retention added +1,124 MB peak commit (30.9 -> 32.1 GB) and +787 MB WS, pushing heavier4k–7k/7k–10kscenes deeper into commit/paging pressure and causing a net regression overall (14.80 -> 14.20 FPS).MIMALLOC_PURGE_DELAY=10/mi_option_set(mi_option_purge_delay, 10)or callingmi_collect(false)under host memory pressure) so 16–32 GB systems keep the fast-pathmimallocspeedup without the ~1.1 GB extra commit footprint.@amazedturnip on GitHub · 2026-11-29 05:38 UTC · original
Running mimalloc as default allocator on 9800X3D + RTX 5070 Ti 16 GB (32 GB RAM, Windows 11) across several gameplay sessions and full shader pretranslations. Clean build, zero allocator crashes or regressions.
@JSa25 on GitHub · 2026-11-30 10:12 UTC · original
An independent measurement of mimalloc as the global allocator, in case it helps this along. Hardware and profile: RTX 5090, Ryzen 9 9950X3D, Series X profile, 2560x1440 with DLSS Quality, frame generation off, ray tracing off.
Method:
scripts/bench.ps1, the camera turning between the window and the room).Why it helps here: before the change, a
VICTORY_PROFILEsample of 60 s of that route put about a fifth of victory-submit's time in the Windows heap (20-23% at the top of its list). With mimalloc, allocation was gone from the top of the list.Our version:
mimallocas the#[global_allocator]behind a cargo feature (mimalloc, off by default), forwarded from the app to victory-hle and victory-gpu.Caveats: one PC, a CPU-bound scene, and a diagnostics build. Where the GPU is the limit the gain should be smaller.