mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
29865e6366
Passing MAP_FIXED to mmap causes already mapped pages in the requested region to be replaced. On Mac OS X this caused pages for JIT-generatd code to appear in the memory range previously auto-allocated for the RAM of the emulated machine. This led to a hang at boot time. The same problem can probably occur on FreeBSD, but not on Linux since MAP_32BIT is used there instead of MAP_FIXED. The solution is to not use MAP_FIXED, but instead rely on the OS honoring the hinted address which is below 4 GB: we don't need an exact match, just a low address.