Re: Towards a working "wine". [long]

From: Maxim Sobolev <sobomax_at_portaone.com>
Date: Fri, 17 Jun 2005 21:11:19 +0300
Peter Edwards wrote:
> Y'all,
> 
> I wanted to run a substantial windows app using "wine", and failed
> miserably. Looking around, it appears to be an acknowledged fact
> that wine is borked on FreeBSD, so I did some hacking about.
> 
> The problems I found are centered around address space allocation:
> Wine is inevitably somewhat sensitive to address space layout,
> seeing as it has to present the Win32 binaries with a reasonably
> familiar environment. (All this assumes standard kernel, etc. Fixed
> addresses are the order of the day)
> 
> Problem 1:
> 
> When starting up, Wine needs to mmap stuff at address 0x80000000,
> but does so without using MAP_FIXED: I think the intention is that
> the code involved should be "best effort" to map to the hint address
> supplied to mmap(), rather than an all-or-nothing thing.
> 
> FreeBSD's mmap sees this as an address in the data segment (see
> problem 2 below), and shifts the hint along to an address past
> there.  There appears to be a MAP_TRYFIXED flag that wine uses on
> some systems that affords the hint more weight, which is pretty
> trivial to implement (see wine_mmap.txt).  That was enough to get
> my app running, but not for long.

Well, there is really no point of adding another MAP_TRYFIXED flag, 
since wine can call mmap(2) with MAP_FIXED and then if that fails try to 
call mmap(2) without it and deal with consequences. This will provide 
the same functionality but you won't get dependency on particular 
FreeBSD version to get MAP_TRYFIXED define.

-Maxim
Received on Fri Jun 17 2005 - 16:11:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:37 UTC