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

Unified Diff: athena/resource_manager/memory_pressure_notifier.h

Issue 588823002: A visibile to invisible state change will also release memory and should therefore wait as an unloa… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 6 years, 3 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
« no previous file with comments | « no previous file | athena/resource_manager/resource_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/resource_manager/memory_pressure_notifier.h
diff --git a/athena/resource_manager/memory_pressure_notifier.h b/athena/resource_manager/memory_pressure_notifier.h
index 338af199e05ea89233a26412ea761631737d6776..20c25c4a3ed49b8694f243f5b5f7f0f793cc76d9 100644
--- a/athena/resource_manager/memory_pressure_notifier.h
+++ b/athena/resource_manager/memory_pressure_notifier.h
@@ -28,12 +28,14 @@ class MemoryPressureObserver {
// The reported memory pressure. Note: The value is intentionally abstracted
// since the real amount of free memory is only estimated (due to e.g. zram).
+ // Note: The bigger the index of the pressure level, the more resources are
+ // in use.
enum MemoryPressure {
- MEMORY_PRESSURE_UNKNOWN, // The memory pressure cannot be determined.
- MEMORY_PRESSURE_LOW, // Single call if memory fill level is below 50%.
- MEMORY_PRESSURE_MODERATE, // Polled for memory fill level of ~50 .. 75%.
- MEMORY_PRESSURE_HIGH, // Polled for memory fill level of ~75% .. 90%.
- MEMORY_PRESSURE_CRITICAL, // Polled for memory fill level of above ~90%.
+ MEMORY_PRESSURE_UNKNOWN = 0, // The memory pressure cannot be determined.
+ MEMORY_PRESSURE_LOW, // Single call if fill level is below 50%.
+ MEMORY_PRESSURE_MODERATE, // Polled for fill level of ~50 .. 75%.
+ MEMORY_PRESSURE_HIGH, // Polled for fill level of ~75% .. 90%.
+ MEMORY_PRESSURE_CRITICAL, // Polled for fill level of above ~90%.
};
// The observer.
virtual void OnMemoryPressure(MemoryPressure pressure) = 0;
« no previous file with comments | « no previous file | athena/resource_manager/resource_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698