Emulator Issues #10926
openGames crash on OpenBSD/amd64 with error "Failed to map enough memory space: Can't allocate memory"
0%
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.
Updated by degasus about 5 years 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?