[2/3] kernel32: GlobalMemoryStatusEx: return the size of physicalmemory + swapsize in ullTotalPageFile/ullAvailPageFile

Dmitry Timoshkov dmitry at codeweavers.com
Wed Mar 14 22:16:03 CDT 2007


"Fabian Bieler" <der.fabe at gmx.net> wrote:

> -    /* Project2k refuses to start if it sees less than 1Mb of free swap */
> -    if (lpmemex->ullTotalPageFile < lpmemex->ullTotalPhys)
> -        lpmemex->ullTotalPageFile = lpmemex->ullTotalPhys;
> -    if (lpmemex->ullAvailPageFile < lpmemex->ullAvailPhys)
> -        lpmemex->ullAvailPageFile = lpmemex->ullAvailPhys;
> +    /* Win98 returns only the swapsize in ullTotalPageFile/ullAvailPageFile,
> +       WinXP returns the size of physical memory + swapsize;
> +       mimic the behavior of XP:
> +    */
> +    lpmemex->ullTotalPageFile += lpmemex->ullTotalPhys;
> +    lpmemex->ullAvailPageFile += lpmemex->ullAvailPhys;

Why did you remove a comment about Project2k? It helps to understand what are
the constrains of the API, and helps to avoid chasing the same bug once again.

-- 
Dmitry.



More information about the wine-devel mailing list