[Wine] Re: Wine memory limitation for malloc?

mikolajz wineforum-user at winehq.org
Tue Jul 22 05:42:01 CDT 2008

There are apps that won't work if there is more than 2GB memory (e.g. they may treat this value as signed and fail to start informing the user that it requires at least 16MB of RAM on a computer with 3GB RAM). That's why Microsoft introduced a header flag that allows the developer to mark the executable as able to handle such an amount of memory. Wine also implements this behaviour. When compiling the program with Visual C, you should try the linker option /LARGEADDRESSAWARE:YES . AFAIK this puts that flag in the header.

As it was said, on 32-bit Windows, in the default configuration, this flag won't change anything as the high 2GB of address space is reserved for the system (and it's not possible to allocate more memory with malloc than the available address space). It's possible to make 3GB of address space available to the application with the /3gb switch in boot.ini. AFAIR, the 3GB address space is the default on Linux and may be even increased by distributions. On 64-bit Windows and Linux, the whole 4GB of address space will be visible to applicaitons with such a flag.

I may also add that this problem is different than the problem addressed by the PAE. The PAE allows to give more than 4GB of physical memory to all the processes in the system. The problem here is how much of the address space is available to a single process.

More information about the wine-users mailing list