[2/3] kernel32/heap: Fix some hacks in GlobalMemoryStatus(). (try 2)

Adam Martinson amartinson at codeweavers.com
Fri Jun 3 09:34:49 CDT 2011

On 06/03/2011 09:14 AM, Adam Martinson wrote:
> On 06/03/2011 03:41 AM, Dmitry Timoshkov wrote:
>> Adam Martinson<amartinson at codeweavers.com>  wrote:
>>> Your previous quesion:
>>> >  How do the processes running in separate address spaces have 
>>> anything
>>> to do with that?
>>> I thought I addressed that with this version of the patch, but if I'm
>>> not checking address space correctly, please tell me the correct way.
>>> PEB::InheritedAddressSpace doesn't work, I'm not sure what else I 
>>> should
>>> be looking for.
>> Fortunately win32 is not DOS.
> Unfortunately that doesn't answer my question =P
The issue is that Dragon NaturallySpeaking 7 setup doesn't have the 
IMAGE_FILE_LARGE_ADDRESS_AWARE flag set, but it uses InstallShield 6 as 
a child process, which does have it set.  IS6 calls GlobalMemoryStatus() 
and passes the data back to DNS7 setup, and if you have more than 2GB 
RAM DNS7 setup thinks you have negative memory.  Windows figures this 
out and rounds to 2GB, Wine does not.  The unset 
IMAGE_FILE_LARGE_ADDRESS_AWARE flag is not inherited by the child 
process (I did check), so this leads me to believe Windows must be doing 
some sort of check like this when deciding to round.  If there is a flaw 
in my logic or there is a better way to do this I am all ears.

More information about the wine-devel mailing list