Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1084)

Unified Diff: content/public/browser/memory_coordinator.h

Issue 2678323002: Add documentation for MemoryCoordinator-related primitives
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« base/sys_info.h ('K') | « base/sys_info.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/memory_coordinator.h
diff --git a/content/public/browser/memory_coordinator.h b/content/public/browser/memory_coordinator.h
index 3b7b7494eaa1f7578e46c90962f97298c1966af4..4c515d70f4663fd76a81b54a8f8cd8bfa7047b08 100644
--- a/content/public/browser/memory_coordinator.h
+++ b/content/public/browser/memory_coordinator.h
@@ -14,7 +14,27 @@ namespace content {
// The interface that represents the browser side of MemoryCoordinator.
// MemoryCoordinator determines memory state of each process (both browser
// and renderers) and dispatches state change notifications to its clients.
-// See comments on MemoryCoordinatorClient for details.
+// See comments on MemoryCoordinatorClient for how to use it.
+//
+// Currently we have three ways to control memory components:
Ryan Sleevi 2017/02/08 15:02:04 Similar to my earlier remarks, the "we" here is am
haraken 2017/02/09 02:37:31 Yeah, the fact that we don't have MemoryCoordinato
+// MemoryCoordinator, MemoryPressureListener and isLowEndDevice.
+//
+// - MemoryPressureListener provides a way for memory components to listen
+// memory-pressure notifications and purge memory when the system is under
+// high memory pressure. This is a 'reactive' way to reduce memory
+// footprint.
+//
+// - isLowEndDevice provides a way for memory components to enter a low-memory
+// mode on low-memory devices. In the low-memory mode, the memory components
+// are exepcted to trade off performance for memory. This is a 'proactive'
+// way to reduce memory footprint.
+//
+// - It is a responsibility of each memory component to decide on which one(s)
+// the memory component should use.
+//
+// - MemoryCoordinator provides both ways. In the future,
+// MemoryPressureListener and isLowEndDevice will be unified into
+// MemoryCoordinator.
class CONTENT_EXPORT MemoryCoordinator {
public:
virtual ~MemoryCoordinator() {}
« base/sys_info.h ('K') | « base/sys_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698