mmap address allocation
John Birrell
jb at cimlogic.com.au
Fri Jun 18 00:42:16 GMT 2004
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
More information about the freebsd-arch
mailing list