Cap the reported physical memory to 2GB to prevent applications
(e.g. QuickTime 6) from crashing.
This commit is contained in:
parent
db45e1ea28
commit
1f0e33cb13
@ -1623,6 +1623,15 @@ VOID WINAPI GlobalMemoryStatus(
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
/* 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)
|
||||||
|
{
|
||||||
|
lpmem->dwTotalPhys=2U*1024*1024*1024;
|
||||||
|
lpmem->dwAvailPhys=2U*1024*1024*1024;
|
||||||
|
}
|
||||||
|
|
||||||
/* FIXME: should do something for other systems */
|
/* FIXME: should do something for other systems */
|
||||||
GetSystemInfo(&si);
|
GetSystemInfo(&si);
|
||||||
lpmem->dwTotalVirtual = (char*)si.lpMaximumApplicationAddress-(char*)si.lpMinimumApplicationAddress;
|
lpmem->dwTotalVirtual = (char*)si.lpMaximumApplicationAddress-(char*)si.lpMinimumApplicationAddress;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user