Large memory reporting
wine-devel at shemesh.biz
Sun Aug 15 03:49:31 CDT 2004
I have a Windows program that tries to find out how much memory it has
at its disposal using "GlobalMemoryStatus". The machine has 4GB of
physical memory and about 100MB of swap. GlobalMemoryStatus returns 2GB
of physical memory and 0 available swap.
It seems the problem is at dlls/kernel/heap.c, around lines 1150. First
we make sure we never report more than 2GB of total or available memory,
and then we make sure that we never report more than 2GB combined
available physical+swap memory (which effectively zeros the available
swap if there is more than 2GB of available memory). The comment next to
/* work around for broken photoshop 4 installer */
While I understand the need for the workaround, this significantly
reduces the usefulness of the whole function. My question:
Can we make these two rounding conditional on the application not
wishing to work with more than 2GB? I.e. - can we let applications that
were linked with LARGEADDRESSAWARE see the true state of the machine?
If so, is there a way for me, when at the heap.c code, to know whether
that flag was set on loading the current process?
Lingnu Open Source Consulting ltd.
More information about the wine-devel