Problems with VirtualAlloc/Lock

Alexandre Julliard julliard at
Tue Mar 15 13:12:04 CST 2005

Michael Ost <most at> writes:

> On Tue, 2005-03-15 at 01:09, Alexandre Julliard wrote:
> > That's a kernel limitation. If you hack the kernel to start allocating
> > from lower addresses (or implement the syscall we discussed to let us
> > specify the mmap range) you can get the full 2GB.
> Could you point me to the kernel limitation? I can mmap() 2GB on an
> unhacked 2.4.19 kernel with this loop:

That's because you can mmap above 0x8000000, but that's not allowed
under Windows. You'll note that on a standard kernel you can only mmap
2GB even though you have a 3GB address space.  If you set the large
address flag when building your application you will get a 3GB address
space on Wine too, which will then let you allocate 2GB; but the
resulting high addresses may break your plugins. The real problem is
that the kernel starts allocations at 0x40000000.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list