Project

General

Profile

Emulator Issues #10926

Games crash on OpenBSD/amd64 with error "Failed to map enough memory space: Can't allocate memory"

Added by johndoe almost 2 years ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

This is due to MemArena::FindMemoryBase trying to mmap() 0x400000000 bytes (16 GiB) of memory, which overshoots my physical memory by quite a bit. Reducing it to an amount actually available to the OS (~7 GiB) works, though I've only lightly tested it on one game (Rhythm Heaven Fever).

The immediate solution would thus be lowering the mmap'd amount or making it a compile-time option, but admittedly that isn't very elegant.

History

#1 Updated by JMC4789 over 1 year ago

  • Assignee set to degasus

Is FreeBSD still a supported case?

#2 Updated by degasus 2 months ago

Indeed, we could lower it easily to 8 GB. But I don't see the point about doing so.

The real point is: "which overshoots my physical memory by quite a bit". This is a big misunderstanding of the mmap call. We don't want to allocate this amount of physical memory, we just want to allocate virtual memory.

So the real bug here is about why does the map fail on your OS?

Also available in: Atom PDF