Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Aug 2004 18:28:02 -0400
From:      Anish Mistry <mistry.7@osu.edu>
To:        John Birrell <jb@cimlogic.com.au>
Cc:        freebsd-current@freebsd.org
Subject:   Re: FreeBSD and wine mmap
Message-ID:  <200408041828.26762.mistry.7@osu.edu>
In-Reply-To: <20040729211209.GH34260@freebsd3.cimlogic.com.au>
References:  <200407271731.12282.mistry.7@osu.edu> <200407291004.19726.mistry.7@osu.edu> <20040729211209.GH34260@freebsd3.cimlogic.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 29 July 2004 05:12 pm, you wrote:
> On Thu, Jul 29, 2004 at 10:04:12AM -0400, Anish Mistry wrote:
> > I should have a bit of time, once I get the acpi_fuji driver cleaned up
> > and Nate or Mark can import it.  Which direction capitan? :)
>
> Look in /usr/src/sys/vm/vm_mmap.c:mmap() for the comment:
>
>     /*
>      * XXX for non-fixed mappings where no hint is provided or
>      * the hint would fall in the potential heap space,
>      * place it after the end of the largest possible heap.
>      *
>      * There should really be a pmap call to determine a reasonable
>      * location.
>      */
>
> The code currently maps memory without a fixed address above the highest
> address that the process has used.
>
> The problem with Wine is that it needs to reserve the top half of the
> process address space for use like older versions of Windows. When Wine
> starts up, it goes through and grabs that memory as soon as it can, then
> it proceeds to dynamically load it's libraries (the Unix shared libraries
> that implement the functions in the DLLs). The first load fails because
> the library can't be mapped above the highest address used.
>
> What you need to do is take the hint from the comment above and write a
> pmap function to determine a reasonable location. You could say that
> a reasonable location is above the highest address used, if there is
> space up there. Otherwise find a hole in the address space.
Ok, so we need something like vm_map_findspace(), but for process address=20
mapping?  ie. pmap_findspace() that will return an address to a large enoug=
h=20
free chunk?

=2D --=20
Anish Mistry
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFBEWL8xqA5ziudZT0RAkvlAJ0eNZx0JD5gbkYW9gKoGP4ouNexMACglLAp
uSyYfUKUzIq0xm9GZqJ5G3I=3D
=3DjkUH
=2D----END PGP SIGNATURE-----



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