Alexandre Julliard wrote:
Shachar Shemesh wine-devel@shemesh.biz writes:
When actually run (through strace), one can see the mmaps being carried out and successful, and then the mmap that fails (no memory). Then malloc is attempted, which tries mmap, then brk, and then mmap again. All fail. This is the point where I stop understanding.
Does anyone have any explanation as to why malloc fails? Does wine prevent large scale use of the lower area due to some reason?
Yes, the malloc area is located above the preloader at 78000000,
I think there is one zero too many here. Did you mean 0780000?
because we need the lower area to map the PE binary; so malloc is not going to get you any additional space.
So, effectively, in order to use this area, we'll need to manage it ourselves. Is that a correct assertion? Is there any reason we use malloc at all at the moment? It seems like unnecessary overhead to me. Don't we already know how to ask the OS for memory, and already know how to manage a heap inside this memory?
In any case, I take it that the memory below the PE allocated address (the one because of which malloc doesn't have any more free memory) is not used for anything at the moment. Any objections to adding it to the global process heap for allocation?
Shachar