[Wine] memory limit?

drescher0110-lists at yahoo.com drescher0110-lists at yahoo.com
Wed Jun 14 09:32:30 CDT 2006



--- bartosz.slowinski at gmail.com wrote:

> I've got a simple (32bit) windows application (compiled in Borland c++
> builder):
> 
> int *p;
> while(1) {
>     p = new int[10000000]; //allocates 40 MB of memory
> }
> 
> on Windows XP it crashes after 50 iterations (i.e. 2 GB allocated)
> 
> but on wine it crashes after 30 iterations (1200 MB allocated)
> 
> is it impossible to use 2gb of memory in wine? why only 1.2GB is
> available?
> 
> I've got wine 0.9.13, linux 2.4 (2.6 doesn't make any difference),
> 2.5GB of physical RAM and 4GB of swap.
> 
As a windows programmer who designs medical imaging graphics workstations, this is a
problem I have had do deal with under windows for close to 10 years... This is
caused by the split between user space and kernel space which limits an application
to 2GB kernel / 2GB user. The problem with this is once you factor in that every
windows application needs to map dlls to its user application space and these dlls
do not load in a manner that conserves application space (they actually load in a
scattered manner in the high user space area) the largest array that you can
allocate in 32 windows (without the 3GB switch) is about 1.2GB. Since windows 2000
advanced server there is a new switch in your boot.ini file that enables a 3GB / 1GB
split so it will be possible to load dlls a little higher in memory thus giving you
a larger available address space. Now how does this all apply to wine. I believe
wine properly emulates  windows design feature and I think there is also a way for
it to emulate the 3GB feature as well but I do not know the details of this on wine.
Sorry.

John



More information about the wine-users mailing list