Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jun 2004 10:41:59 +1000
From:      John Birrell <jb@cimlogic.com.au>
To:        arch@freebsd.org
Subject:   mmap address allocation
Message-ID:  <20040618004158.GN15577@freebsd3.cimlogic.com.au>

next in thread | raw e-mail | index | archive | help
The current Wine code won't run on either FreeBSD4 or -current now that they've
added code that tries to snaffle (mmap) all memory in user space from 0x80000000
up. They do this because Windows 9x uses that area as a shared heap. The snaffle
takes place as early as they can, before they start loading libraries like ntdll
and kernel32.

The FreeBSD mmap address allocation in the case where no address hint is provided,
always tries to allocate memory above all existing allocations. Obviously this
fails when dlopen() tries to load another shared library.

There is a comment in sys/vm/vm_mmap.c:mmap that mentions "There should really be
a pmap call to determine a reasonable location".

What are people's thoughts about implementing such a thing (and having it do a
better job of choosing an address)?

-- 
John Birrell



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