gecko-dev/modules/libpref
Toshihito Kikuchi 0b6b4d9629 Bug 1711610 - Should not trigger the memory pressure event if the available commit space is not low. r=gsvelto
After bug 1586236, we use the memory resource notification object to detect a low
memory situation on Windows, which is signaled when the available physical memory
is low.  If the available physical memory is low, however, it's possible that there
is still commit space enough for the application to run.  In such a situation, we
don't want to make aggressive efforts to reduce memory usage.

This patch makes sure we send the memory pressure event (both New and Ongoing) only
when the available commit space is lower than the threshold value defined by the pref
"browser.low_commit_space_threshold_mb".  Its default value is set to 200MB
based on our telemetry data indicating ~60% of OOM crashes with <100MB, ~75% with <300MB.

To use the pref in `nsAvailableMemoryWatcher`, this patch moves the call to
`AvailableMemoryTracker::Init()` to `XRE_mainRun()`.  It was in `NS_InitXPCOM`
because the old initialization code hooked APIs and needed to be done while
the process has only one thread (bug 741540).  The current `AvailableMemoryTracker`
does not use hooks, so it doesn't have to be initialized that early.

Differential Revision: https://phabricator.services.mozilla.com/D115605
2021-05-24 21:29:46 +00:00
..
docs
init Bug 1711610 - Should not trigger the memory pressure event if the available commit space is not low. r=gsvelto 2021-05-24 21:29:46 +00:00
parser Bug 1648348 - Fix formatting errors in the prefs parser's rustdocs. r=froydnj 2020-07-07 07:38:10 +00:00
test Bug 1694515 - Part 1: Allow to parse prefs from data. r=KrisWright 2021-03-12 04:08:41 +00:00
Preferences.cpp Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag 2021-03-17 15:49:46 +00:00
Preferences.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
SharedPrefMap.cpp Bug 1653231 - Change SharedPrefMapBuilder::Add to accept a const nsCString&. r=njn 2020-07-21 06:35:44 +00:00
SharedPrefMap.h Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika 2021-03-24 17:56:49 +00:00
StaticPrefsBase.h
components.conf Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi 2020-07-09 21:42:25 +00:00
greprefs.js Bug 1426269 - Filter full-line comments and empty lines from prefs files. r=glandium,geckoview-reviewers,snorp 2020-09-08 07:10:54 +00:00
moz.build Bug 1415923 - Ignore sleep and wake notifications on OSX r=xpcom-reviewers,KrisWright 2021-02-04 21:40:47 +00:00
nsIPrefBranch.idl
nsIPrefLocalizedString.idl
nsIPrefService.idl Bug 1694515 - Part 1: Allow to parse prefs from data. r=KrisWright 2021-03-12 04:08:41 +00:00
nsIRelativeFilePref.idl
nsRelativeFilePref.h