mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
On macOS (if using e.g. Crossover), VirtualQuery can report a memory address as free but still fail to reserve the memory with VirtualAlloc (fails with error code 0x170C240 for some reason). To fix this, memory is now reserved directly in the loop to ensure it can be reserved. If reservation fails, the next address is tried.