[Bug 49939] Clive Barker's Jericho Demo claims not enough room on C: when Wine is built with mingw (NtMapViewOfSection returns STATUS_NOMEMORY)

WineHQ Bugzilla wine-bugs at winehq.org
Thu Jan 7 17:54:17 CST 2021


https://bugs.winehq.org/show_bug.cgi?id=49939

--- Comment #13 from Anastasius Focht <focht at gmx.net> ---
Hello Gijs,

took a bit but then I remembered bug 48417, specifically
https://bugs.winehq.org/show_bug.cgi?id=48417#c4

The default image base for Wine 32-bit PE builtins is 0x10000000 when built
with LLVM based MinGW which causes relocation into low address space range for
almost every PE dll in my case. The exception are Wine core dlls with
hard-coded image base and hybrids that have not been converted to PE format.

Your distro MinGW uses '--enable-auto-image-base' by default which hard-codes a
unique image base for every PE builtin. The few PE builins that are mapped to
low address range in your case are just relocated due to address space
collisions when the linker calculated an image base that overlaps into an
existing one.

FYI 32-bit installer isn't linked with '/LARGEADDRESSAWARE'.

In your case, the remaining big "hole" is simply not large enough for mapping
size of 0x438e0000 (1081 MiB):

--- snip ---
...
007c0000-00af4000 r-xs 00000000 08:12 30802136 .. wine/nls/sortdefault.nls
...
00f51000-20000000 ---p 00000000 00:00 0 
61740000-61766000 r-xp 00000000 08:12 36179889 32Bit/dlls/advapi32/advapi32.dll 
...
--- snip ---

My case, with most PE builtins mapped to low range gives better layout because
0x6XXXXXXX range is not consumed.

--- snip ---
...
100de000-101da000 r-xp 000be000 fd:01 17601058 x86_64/lib/wine/user32.dll
101da000-20000000 ---p 00000000 00:00 0
...
7ac46000-7ac49000 rwxp 00046000 fd:01 17600982 ... x86_64/lib/wine/riched20.dll
--- snip ---

You could try to pass '--disable-auto-image-base' to your Distro MinGW to
achieve a better address space layout. Downside: small performance penalty on
the loader side due to more dll relocations.

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list