Re: FreeBSD and wine mmap

From: Anish Mistry <mistry.7_at_osu.edu>
Date: Wed, 4 Aug 2004 18:28:02 -0400
-----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 
mapping?  ie. pmap_findspace() that will return an address to a large enough 
free chunk?

- -- 
Anish Mistry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFBEWL8xqA5ziudZT0RAkvlAJ0eNZx0JD5gbkYW9gKoGP4ouNexMACglLAp
uSyYfUKUzIq0xm9GZqJ5G3I=
=jkUH
-----END PGP SIGNATURE-----
Received on Wed Aug 04 2004 - 20:27:21 UTC

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