[PATCH v2] kernel32: Do not impose 32 bit limits on Win64 in GlobalMemoryStatus().

Francois Gouget fgouget at codeweavers.com
Fri Apr 30 13:04:58 CDT 2021


On Wed, 21 Apr 2021, Paul Gofman wrote:
[...]
> +    size = min(memex.ullTotalPhys, ~(SIZE_T)0 >> 1);
> +    ok(compare_ulong64(mem.dwTotalPhys, size, max_diff), "Got unexpected dwTotalPhys %s, size %s.\n",
> +            wine_dbgstr_longlong(mem.dwTotalPhys), wine_dbgstr_longlong(size));
> +    size = min(memex.ullAvailPhys, ~(SIZE_T)0 >> 1);
> +    ok(compare_ulong64(mem.dwAvailPhys, size, max_diff), "Got unexpected dwAvailPhys %s, size %s.\n",
> +            wine_dbgstr_longlong(mem.dwAvailPhys), wine_dbgstr_longlong(size));

This does not seem to work on Windows <= 8.1 when there is more than 4GB 
of RAM:

https://test.winehq.org/data/patterns.html#kernel32:heap

heap.c:1239: Test failed: Got unexpected dwTotalPhys ffffffff, size 7fffffff.
heap.c:1242: Test failed: Got unexpected dwAvailPhys ffffffff, size 7fffffff.

The available memory is probably why this was not detected by the 
TestBot VMs since they all have less than 4GB.

Could you adjust the test?

-- 
Francois Gouget <fgouget at codeweavers.com>



More information about the wine-devel mailing list