mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
b=475595; disable IsLowMemory on Windows CE until we can fix it to be correct/performant; r=dougt
This commit is contained in:
parent
2a7a44217c
commit
d27b42a061
@ -193,9 +193,17 @@ NS_IMETHODIMP
|
||||
nsMemoryImpl::IsLowMemory(PRBool *result)
|
||||
{
|
||||
#if defined(WINCE)
|
||||
*result = PR_FALSE;
|
||||
// See bug 475595 -- this is incorrect right now, and causes a big
|
||||
// perf hit since GlobalMemoryStatus has to grab a kernel VM lock
|
||||
// and do a bunch of munging through VM pages to get the data
|
||||
// that's requested. We call IsLowMemory in some performance
|
||||
// critical code (e.g. during painting), so that's bad.
|
||||
#if 0
|
||||
MEMORYSTATUS stat;
|
||||
GlobalMemoryStatus(&stat);
|
||||
*result = ((float)stat.dwAvailPhys / stat.dwTotalPhys) < 0.1;
|
||||
#endif
|
||||
#elif defined(XP_WIN)
|
||||
MEMORYSTATUSEX stat;
|
||||
stat.dwLength = sizeof stat;
|
||||
|
Loading…
Reference in New Issue
Block a user