Confused about how LAA works in Wine

Questions about Wine on Linux
Locked
Time4Tea
Level 3
Level 3
Posts: 56
Joined: Sat Apr 25, 2020 11:32 am

Confused about how LAA works in Wine

Post by Time4Tea »

Hi, I'm a bit confused about how 'large address aware' (LAA) mode works in Wine, for 32-bit applications.

I'm trying to play the game Race Driver: Grid in a 32-bit prefix and I seem to be getting a lot of crashes (both with and without dxvk) due to 'memory allocation errors'. I suspect the issue might be due to the 2GB limit for 32-bit applications being exceeded. I have read that there is an environment variable that can be set to enable LAA (LARGE_ADDRESS_AWARE=1) - does that work in vanilla Wine, or just in Wine Staging? Is there anything else I need to do, to enable LAA?

I'm using vanilla Wine version 7.19
Time4Tea
Level 3
Level 3
Posts: 56
Joined: Sat Apr 25, 2020 11:32 am

Re: Confused about how LAA works in Wine

Post by Time4Tea »

Bump! No-one knows?

I thought I had seen a user guide page before somewhere that explains how it works, but I haven't been able to find it.
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: Confused about how LAA works in Wine

Post by jkfloris »

If I understand correctly then (vanilla) wine(-staging) uses LAA when the program has the IMAGE_FILE_LARGE_ADDRESS_AWARE/LARGEADDRESSAWARE flag.

With Proton you can force this with WINE_LARGE_ADDRESS_AWARE=1

---
https://bugs.winehq.org/show_bug.cgi?id=47883
https://bugs.winehq.org/show_bug.cgi?id=33858
https://bugs.winehq.org/show_bug.cgi?id=34658
Time4Tea
Level 3
Level 3
Posts: 56
Joined: Sat Apr 25, 2020 11:32 am

Re: Confused about how LAA works in Wine

Post by Time4Tea »

@jkfloris: thanks very much for clarifying, that's really helpful! :D
Locked