Correct ullTotalVirtual for GlobalMemoryStatusEx()

Ray Hinchliffe ray at rh-software.com
Wed Oct 14 03:23:45 CDT 2009


Hi,

This is my first ever wine patch, so I hope this e-mail is what is needed to get it into Wine.

On my system the ullTotalVirtual returned by GlobalMemoryStatusEx() was 0xFFFFFFFFBFFEFFFF when it should be 0x00000000BFFEFFFF.  This was caused by casts to (char*) when they should have been (ULONG_PTR).

This was confusing SIV 4.01.

After this patch was applied I tested it using SIV 4.02 (http://rh-software.com/downloads/siv.zip) using the command:

wine siv -save=[virtual]=stdout

the generated output was:

Resource Usage 4%       Current                        Maximum                      Free                         Extended

System Physical Memory  0x000000000AC1D000   172.11MB  0x00000000E4742000   3.57GB  0x00000000D9B25000   3.40GB
System Paging File      0x000000000AC1D000   172.11MB  0x00000001E45E9000   7.57GB  0x00000001D99CC000   7.40GB
Process Virtual Memory  0x0000000000010000    64.00KB  0x00000000BFFEFFFF   3.00GB  0x00000000BFFDFFFF   3.00GB  0x0000000000000000  0

                        Minimum                        Maximum
Application Addresses   0x00010000            64.00KB  0xBFFFFFFF           3.00GB


Regards,
Ray

http://rh-software.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20091014/63d3e1a9/attachment.htm>


More information about the wine-patches mailing list