Commit 2130f613 authored by Alexandre Julliard's avatar Alexandre Julliard

In GlobalMemoryStatus, also cap the sum of dwAvailPhys and

dwAvailPageFile at 2Gb to avoid a bug in Photoshop 4.
parent 9bfe0c4e
......@@ -1141,12 +1141,16 @@ VOID WINAPI GlobalMemoryStatus(
/* Some applications (e.g. QuickTime 6) crash if we tell them there
* is more than 2GB of physical memory.
*/
if (lpmem->dwTotalPhys>2U*1024*1024*1024)
if (lpmem->dwTotalPhys >= 2U*1024*1024*1024)
{
lpmem->dwTotalPhys=2U*1024*1024*1024;
lpmem->dwAvailPhys=2U*1024*1024*1024;
lpmem->dwTotalPhys=2U*1024*1024*1024 - 1;
lpmem->dwAvailPhys=2U*1024*1024*1024 - 1;
}
/* work around for broken photoshop 4 installer */
if (lpmem->dwAvailPhys + lpmem->dwAvailPageFile >= 2U*1024*1024*1024)
lpmem->dwAvailPageFile = 2U*1024*1024*1024 - lpmem->dwAvailPhys - 1;
/* FIXME: should do something for other systems */
GetSystemInfo(&si);
lpmem->dwTotalVirtual = (char*)si.lpMaximumApplicationAddress-(char*)si.lpMinimumApplicationAddress;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment