-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merge to M67] Propagate memory pressure to child processes.
MemoryPressureMonitor (added in https://crrev.com/c/953166) polls memory pressure when it gets CRITICAL to (1) lower memory usage by repeatedly invoking pressure listeners and (2) sense (and notify listeners) when pressure subsides. However the polling only happens in the browser / WebView process, because (1) ActivityManager.getMyMemoryState() can't be called from isolated services, and (2) we want to poll only when Chrome is in the foreground / there are WebView instances around. This CL propagates pressure signals from the polling process to all its services. That way in addition to getting pressure signals from Android via ComponentCallbacks2, services also get signals from the their main process. (cherry picked from commit 9bd1a50) Bug: 813909 Change-Id: Icef3b31106dcf432e6cdbdb0e1cdd84539dd690b Reviewed-on: https://chromium-review.googlesource.com/992865 Reviewed-by: Daniel Cheng <[email protected]> Reviewed-by: Bo <[email protected]> Reviewed-by: agrieve <[email protected]> Commit-Queue: Dmitry Skiba <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#550850} Reviewed-on: https://chromium-review.googlesource.com/1016065 Reviewed-by: Dmitry Skiba <[email protected]> Cr-Commit-Position: refs/branch-heads/3396@{#74} Cr-Branched-From: 9ef2aa8-refs/heads/master@{#550428}
- Loading branch information
Dmitry Skiba
committed
Apr 18, 2018
1 parent
1e01ecc
commit e148251
Showing
5 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters