Towards a working "wine". [long]
Poul-Henning Kamp
phk at phk.freebsd.dk
Fri Jun 17 21:39:25 GMT 2005
In message <20050617180232.GA25818 at freefall.freebsd.org>, Peter Edwards writes:
>There is a disasterously ugly hack attached, wine_malloc.txt that
>hacks on malloc(), and adds a "W" option to enable the hack. This
>works by trading the brk()/sbrk() calls for an mmapping starting
>at 0xa0000000, which should be able to grow towards the process
>stack. (phkmalloc works with a large contiguous heap, rather than
>a fragmented one, so a more "pure" mmap-based approach won't fit
>into it too smoothly.)
phkmalloc works just fine with a fragmented heap, but allocates too
much memory for the page-map if all the memory is too far away
from "_end".
The correct (and portable) fix is to give phkmalloc a treee-structure
instead of a linear array to manage the page table.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-current
mailing list