wow-optimize v3.16.1
Important
This patch update focuses on stabilizing client networking, resolving connection/handshake drops under LAA (Large Address Aware), and preventing game client hangs or zombie background processes upon exit.
Key Changes & Stability Enhancements
1. Memory Allocator Thread-Filtering
- Thread-Filtered Allocator Redirection
- Change: Restructured the static CRT allocator redirection (
mimalloc) to only intercept allocations originating from the main game thread. - Rationale: Background socket, database, and audio threads bypass the redirect and allocate from the native CRT heap, resolving Large Address Aware (LAA) pointer conflicts (>2GB) with legacy third-party socket filter drivers (e.g. ExitLag).
- Change: Restructured the static CRT allocator redirection (
- Config-Gated Allocator Hooks
- Change: Gated static CRT allocator detours by the runtime ini configuration (
Config::g_settings.OptAllocators). - Rationale: Disabling it in the configurator launcher now properly deactivates the allocator hooks at runtime.
- Change: Gated static CRT allocator detours by the runtime ini configuration (
2. Termination & Exit Stability
- Fast-Kill Exit Handler
- Change: Configured the
ExitProcesshook to immediately terminate the game usingTerminateProcess(GetCurrentProcess(), uExitCode)upon log flushing. - Rationale: Abrupt termination of background worker threads during regular
ExitProcessleft mutexes and heap locks in an abandoned/locked state, deadlocking the main thread and leavingwow.exehanging as a zombie process. Fast-killing prevents these hangs entirely, enabling clean subsequent launches.
- Change: Configured the
3. Redundancy & Conflict Deactivations
- Bypassed Winsock Hooks: Bypassed hooks on Winsock APIs (
connect,send,recv, andWSARecv), returning networking to the native OS stack to prevent socket thread-local error state corruption and connection drops. - Bypassed ThreadId Caching: Disabled GetCurrentThreadId/GetCurrentThread hooks, avoiding thread-pool scheduling deadlocks inside Winsock's APC queue.
- Bypassed HeapRedirect Safety Bridge: Disabled HeapFree/HeapReAlloc safety bridge hooks, avoiding heap-walk crashes.
- Bypassed Lua VM Allocator Pool: Disabled the custom thread-local Lua VM allocator pool hook to prevent memory leaks during UI reloads on relog.