Emulator Issues #7832
closedDolphin depends on MAP_32BIT being available and working
0%
Description
We should allocate a 4 GiB chunk of virtual memory and write our own allocator for it (4 GiB so we can continue using RIP-relative addressing). That way we could avoid our current dependency on MAP_32BIT which would ease porting to *BSD and enable us to use tools like valgrind.
Note: This does not mean you need 4 GiB of RAM to run Dolphin (use MAP_NORESERVE, maybe with fallback in case overcommitting is disabled).
Marking it as easy because although it may sound difficult at first, it is a well-known problem with an existing API in Dolphin (Common/MemoryUtil.h).
Updated by flacs over 9 years ago
- Status changed from New to Won't fix
Actually, it turns out valgrind works fine if you #undef MAP_32BIT and there is a working FreeBSD port. Also, 2 GiB.
Updated by phire over 9 years ago
Also, dolphin also makes the assumption that jitted code will be within 4gb of the .text and various .data/.rodata sections.
So this plan wouldn't really work.