"Fabian Bieler" <[EMAIL PROTECTED]> 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.


Reply via email to