[FreeBSD] locating wine at 0x20000000

Tijl Coosemans tijl at ulyssis.org
Tue Aug 8 15:53:04 CDT 2006


On Tuesday 08 August 2006 20:05, Alexandre Julliard wrote:
> Tijl Coosemans <tijl at ulyssis.org> writes:
> 
> > Currently I lower RLIMIT_DATA to 0x18000000 (384Mb) in wine-glibc and
> > locate wine-pthread at 0x64000000. Is this an acceptable location?
> >
> > There has to be enough room after wine-pthread + data segment for
> > every lib and dlopen'ed object. Moreover, the data segment can't be too
> > small because it's the malloc heap and the limit is inherited by the
> > wineserver process. So this is a bit of a balancing act.
> 
> It seems it would be preferable to set a much lower limit and raise it
> again before starting wineserver. Otherwise it creates a big range of
> memory that will be inaccessible to Windows apps, and force us to
> relocate pretty much all native dlls.

Only the super-user can increase the max limit. Other users can only
decrease it. And all those unix shared libs (x11, etc.) need heap space
as well. I don't know how much they all need. Maybe a 128Mb heap would
be sufficient? That would bring us to 0x74000000.

The other solution I guess would be to add a malloc implementation to
libwine that overrides libc malloc. Maybe there are other platforms
with older brk(2) style malloc implementation that could benefit from
this as well? FreeBSD 7.0 has a more modern brk+mmap style malloc btw,
so evetually this problem will disappear.



More information about the wine-devel mailing list