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

From: Peter Edwards (peadar.edwards_at_gmail.com)
Date: 06/27/05

  • Next message: Andrew Thompson: "Re: small typo in the if_bridge man page"
    Date: Mon, 27 Jun 2005 11:39:14 +0100
    To: Martin Cracauer <cracauer@cons.org>
    
    

    On 6/23/05, Martin Cracauer <cracauer@cons.org> wrote:
    > > > Have you seen Martin Cracauer's mail ("My hacks to make the memory map
    > > > fit") on emulation@ which deals with the memory map? Maybe it's of help
    > > > here...
    > >
    > > No I hadn't seen them, thanks for the reference.
    > > These won't help in this case: It's almost the opposite problem. I think.
    > > Martin's hack leaves a gap between the data segment and the area that
    > > mmap starts looking in for address space. However, because of the
    > > format of the wine binary, it's data segment is very high in memory,
    > > and the area required by wine's mmap actually falls inside it. i.e.,
    > > Martins fix pushes out the starting point for mmap searches, but wine
    > > needs hit dragged in.
    >
    > If this is still a problem, can you be more specific what you would
    > like to have mapped where?
    >
    > I think I can force anything to map anywhere but I know zero about
    > Win32 or how Wine works.
    >

    I'm not sure if you've seen the original message, but the problem
    arises from a combination of Wine trying to map a windows heap at
    location 0x80000000, while locating the executable up at 0x77f00000.
    My Win32/wine foo is also very weak, but I recall from debugging
    windows code that the address space in that area is reasonably heavily
    populated.

    On FreeBSD the gap between the executable's end (where the data
    segment is) and 0x80000000 range becomes the maximum extent of your
    heap, because you can't extend the break beyond the mapped 0x80000000
    area, which is too small for practical use with Win32 programs, given
    that malloc() allocates its space via sbrk().

    As I said, I'm not particularly strong on Win32 address layout, so
    I'll defer to the wine authours' choice on what's best for Win32
    compatibility. The problem is that they interact badly with our
    malloc().

    I suspect the ideal solution would be for wine to provides it's own
    version of malloc(), given it is so sensitive to the mechanism used to
    carve up address space, but malloc() is probably a better thing to
    hack on than mmap() from the FreeBSD side in this case, removing the
    dependency on sbrk() for those executables that need it (although my
    previous hack is obviously woefully inadequate) I'll see if I can roll
    some more acceptable patches for malloc().
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: Andrew Thompson: "Re: small typo in the if_bridge man page"

    Relevant Pages

    • Towards a working "wine". [long]
      ... I wanted to run a substantial windows app using "wine", ... FreeBSD's mmap sees this as an address in the data segment (see ... executable image with the heap space (which malloc uses). ... hacks on malloc, and adds a "W" option to enable the hack. ...
      (freebsd-current)
    • Re: Segmentation fault when free
      ... Try tracing the malloc and free calls, ... library code that others are supposed to use, ... While it's understandable as a 'quick hack' ...
      (freebsd-questions)
    • Re: Wintel app needs porting who can do it?
      ... I assumed that emulators were slow. ... Wine isn't an emulator but rather a win32 implementation under Linux. ...
      (comp.os.linux.development.apps)
    • Re: Question about freeBSD OS
      ... Not with out some sort of emulator like dosbox, qemu, or wine. ... version and copy the game files over from the win32 version. ...
      (freebsd-questions)
    • Re: HOWTO: SemiPainless installation of Irfanview on SuSE 10.1
      ... The programmer was talking ... about a QT port a while back but development seems to have stopped at the ... on Wine 0.9.20 it crashed twice when trying to open a ... I wouldnt use the win32 version then. ...
      (alt.os.linux.suse)