Critical Fix: Teleport OOM Crashes Resolved
The Problem
Users reported crashes when teleporting between zones with heavy addon setups (20+ addons, 350-450MB Lua memory). Error: "Requested 21031760 bytes" in M2Shared.cpp:267. Version v3.2.1 did NOT crash — all later versions did.
Root Cause (NOT GC)
Analysis of user logs revealed the true culprit was address space fragmentation, not garbage collection:
[Stats] VA Space: Free=52MB LargestBlock=2MB WARNING: fragmented
VA Arena v3: 6 hits, 4311 fallbacks, 0 fail (0.1% arena, 0.0 MB used)
[LuaOpt] EMERGENCY GC (incremental): 413.2 MB -> 413.2 MB ← 0KB freed
- VA Arena reserved 512MB of contiguous virtual address space but used only 0.1% (6 allocations out of 4,317 calls)
- This reservation fragmented the 32-bit address space, leaving the largest contiguous free block at just 2MB
- M2 3D models require ~20MB contiguous memory at teleport → allocation failure → crash
- Emergency GC was not the issue — it freed 0KB because Lua objects are live (413-446MB of addon data)
What Changed
| Feature | v3.5.5 | v3.5.6 |
|---|---|---|
| VA Arena | ACTIVE (512MB reserved, 0.1% used) | DISABLED |
| Normal GC step | 64 KB/frame | 128 KB/frame |
| Combat GC step | 16 KB/frame | 32 KB/frame |
| Idle GC step | 128 KB/frame | 256 KB/frame |
| Loading GC step | 256 KB/frame | 512 KB/frame |
| Loading-mode emergency GC | Skipped entirely | 64 MB steps, 2s cooldown |
| Post-GC adaptive decrease | Triggered at >2ms | Triggered at >5ms |
Why This Works
Disabling VA Arena frees 512MB of contiguous virtual address space reservation. The 32-bit WoW process now has sufficient contiguous blocks for M2 model allocation during teleport/zone transitions.
Increased GC step sizes ensure faster collection during heavy sessions (400MB+ Lua memory). Loading-mode emergency GC prevents memory buildup during zone transitions when models are loading.
LuaBoost Companion
Use with LuaBoost v1.9.4 for complete optimization stack:
- DLL fully controls GC (addon delegates when DLL detected)
- No duplicate GC work between addon and DLL
- Standalone fallback when DLL absent
Installation
Copy wow_optimize.dll + version.dll to your WoW 3.3.5a folder.