Why Steam fails [VirtualAlloc]
Rob Shearman
rob at codeweavers.com
Sat Dec 3 20:39:01 CST 2005
Ivan Gyurdiev wrote:
>> I tries that with the exact same results...
>> Attempted mmap_anon of size 200MB...fails...Steam fails, with ENOMEM.
>>
> Here's the exact mmap call... it's the only one that fails, and it's
> the largest without MAP_NORESERVE.
>
> mmap2(NULL, 209780736, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> -1 ENOMEM (Cannot allocate memory)
You've probably got a fragmented address space caused by having a lot of
dynamic libraries loaded at different addresses...
> Running the same call from a test program suceeds - I can mmap()
> things that are an order of magnitude larger without problems (as a
> regular user).
...which doesn't happen in your test program as it doesn't use as many.
Remember that it takes only one page of memory sitting at the wrong
virtual memory address to divide the available contiguous addresses in
half. I would suggest playing around with the prelink tool to put
dynamic libraries in better positions in memory.
Rob
More information about the wine-devel
mailing list