Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jun 2005 13:06:36 +0100
From:      Peter Edwards <peadar.edwards@gmail.com>
To:        Alexander Leidinger <Alexander@leidinger.net>
Cc:        current@freebsd.org
Subject:   Re: Towards a working "wine". [long]
Message-ID:  <34cb7c84050618050623db6187@mail.gmail.com>
In-Reply-To: <20050618083026.26238653@Magellan.Leidinger.net>
References:  <20050617180232.GA25818@freefall.freebsd.org> <42B31247.9010603@portaone.com> <34cb7c840506171121cd0437f@mail.gmail.com> <42B3189E.6030408@portaone.com> <34cb7c8405061716327ca4c6d7@mail.gmail.com> <Pine.LNX.4.53.0506171757250.13669@regurgitate.ugcs.caltech.edu> <20050618083026.26238653@Magellan.Leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/18/05, Alexander Leidinger <Alexander@leidinger.net> wrote:
> On Fri, 17 Jun 2005 17:59:38 -0700 (PDT)
> Jon Dama <jd@ugcs.caltech.edu> wrote:
>=20
> > My intuition says that mmap should ignore requests to map into the
> > existing brk region but not reject requests that are merely between the
> > existing brk region and the DS limit.
>=20
> 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.

Jean-Marc DETREZ posted an interesting patch to emulation@ and wine's
patches list around the same time that's more promising, though:
"patch for unbreaking wine on freebsd"

This uses mincore() + mmap(... MAP_FIXED ...) when mincore returns
EFAULT. I'll have a read of it.

It looks like both OpenBSD and NetBSD now incorporate a MAP_TRYFIXED,
though. And, from a comment on the OpenBSD 3.4 changelog, adding it to
the linuxulator may also help compatibility there.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34cb7c84050618050623db6187>