[Bug 23318] Bus Simulator 2008 (demo) complains about insufficient memory on startup

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Oct 1 14:21:05 CDT 2011


http://bugs.winehq.org/show_bug.cgi?id=23318

--- Comment #12 from jhgf <bernhardloos at googlemail.com> 2011-10-01 14:21:05 CDT ---
Created attachment 36637
  --> http://bugs.winehq.org/attachment.cgi?id=36637
release the reserved address space until it's actually needed

Turns out I had a bunch of holes in my understanding of how exactly wine
reserves virtual address space ...
Anyway, the main problem is, that this app uses LoadLibrary to open most of
it's dependencies (dinput, opengl, winmm and a few more), instead of linking
directly against them and ld maps them all over the place.
The attached patch fixes this by deferring the release of the reserved until a
mmap call fails with ENOMEM. For this, it's necessary to hook mmap.
Also, malloc calls still end up using the mmap in glibc directly and will fail
if the unreserved memory runs out, but this doesn't seem to be a problem
compared to mmap. A solution would be to hook malloc in the same way as mmap.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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