FreeBSD and wine mmap

Anish Mistry mistry.7 at
Wed Aug 4 15:27:22 PDT 2004

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
Version: GnuPG v1.2.4 (FreeBSD)


More information about the freebsd-current mailing list