Discussing address space for 32bit apps

Axel Davy davyaxel0 at gmail.com
Sun Nov 11 05:23:13 CST 2018


Hi,


Wine emulates windows behavior of restricting virtual address space for 
32 bits apps to the low 2GB.


One issue though is that in this process space, some of the space is not 
directly used by the application. Indeed the linux libs loaded by wine 
(including things like pulseaudio) and the wine dlls take space in the 
process space.


I am a gallium nine developer, and this has been particularly an issue 
for us for some games, as in addition to all the libs loaded without 
gallium nine, some extra libs are loaded.

Some games will crash very fast. For example Mass Effect 1 complains 
being out of virtual mem when loading a save. We have a few opened 
issues related (https://github.com/iXit/Mesa-3D/issues/309 for example).


We thought this would be fixed by having gallium nine use wine's 
HeapAlloc for all its allocations, but this hasn't helped. Indeed the 
problem doesn't seem to be gallium nine allocating memory, but gallium 
nine code (and other linux libs) being mapped on the process space and 
thus preventing that space to be used for allocations.

A tester who doesn't use pulseaudio said he didn't run into issues with 
Mass Effect 1. Indeed the fact pulseaudio takes almost half the space 
allocated by all the linux libs, which could explain that.

I also hit the Mass Effect 1 issue with wine without gallium nine, after 
an hour of play, which further proves this is not gallium nine specific, 
though gallium nine makes it worse.

Making the game exe Large Space aware fixes the issue, as wine will not 
prevent allocation to be in the low 2GB.


What are your thoughts on this issue ?

I understand it could be important for some apps to have the code it 
calls live in the low 2GB, but all the code of internal libs (libGL, 
libX11, gallium nine's d3dadapter) and maybe some allocations 
(pulseaudio, etc) could be mapped on the upper 2GB.



Yours,


Axel Davy




More information about the wine-devel mailing list