Kernel32: 3GB UserSpace boot option

Stefan Reimer lists at startux.de
Thu Oct 16 10:39:40 CDT 2008


Hi,
compiling binaries with the LARGE_ADDRESS_AWARE flag set is not enough to
be able to use more than 2GB user space.
To behave like WindowsXP booted with the /3GB option, at least the
lpMaximumApplicationAddress in GetSystemInfo has to be changed to
0xBFFEFFFF and the virtual user space has to be reserved in mmap_init in
mmap.c up to that address.

See Windows memory management:

http://ymei.freeshell.org/gopher/Book/Programming%20Applications%20for%20MS%20Windows%204thed/ch13c.htm
http://codeidol.com/other/inside-windows-2000/Memory-Management/Address-Space-Layout/

I am quite sure that my proposed hack is not complete to behave like the
/3GB option, but as stated in cpu.c
384         /* FIXME: the two entries below should be computed somehow... */
385         cachedsi.lpMinimumApplicationAddress    = (void *)0x00010000;
386         cachedsi.lpMaximumApplicationAddress    = (void *)0x7FFEFFFF;

we should look at this in order to be able to use more than 2GB user space
for apps that need it.

Regards
Stefan Reimer




More information about the wine-devel mailing list