Project

General

Profile

Actions

Emulator Issues #7832

closed

Dolphin depends on MAP_32BIT being available and working

Added by flacs over 9 years ago.

Status:
Won't fix
Priority:
Normal
Assignee:
-
Category:
Common
% Done:

0%

Operating system:
FreeBSD
Issue type:
Feature request
Milestone:
Future
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
Yes
Relates to maintainability:
No
Regression start:
Fixed in:

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).

Actions #1

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.

Actions #2

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.

Actions

Also available in: Atom PDF