Subject: Re: Wine builds ok but wont run
To: Mark Kirby <>
From: David Laight <>
List: tech-pkg
Date: 01/15/2005 18:30:56
On Sat, Jan 15, 2005 at 12:58:37PM +0000, Mark Kirby wrote:
> Hi guys
> Just updated pkgsrc a few hours ago and built emulators/wine (wine-20050111). 
> It builds and installs ok but it wont run.
> Just running wine --help throws this error up
> wine: failed to initialize: mmap of entire address space failed: Cannot 
> allocate memory

IIRC - from discussion on the wine-devel list...

The problem stems from the fact that some M$ libraries assume they are
loaded below 0x80000000.  Unix systems tend to allocate addresses up
to 0xc0000000 (or even 0xe0000000) to user space (forcing the kernel
to 'shoe-horn' itself into the remaining address space).

wine tries to mmap all the space above 0x80000000 during startup in order
to stop the OS using those addresses for windows libraries later on.

Under Linux this is done setting a "don't allocate swap space" flag, and
the mmap'ed space cannot be counted towards the processes VM limts(s).

I would have thought it better to add a flag to mmap to say "map below
specified address".


David Laight: