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

Unified Diff: base/memory/discardable_memory_provider.h

Issue 59083011: base: Avoid purging more discardable memory than necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better comment Created 7 years, 1 month 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 | base/memory/discardable_memory_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/discardable_memory_provider.h
diff --git a/base/memory/discardable_memory_provider.h b/base/memory/discardable_memory_provider.h
index 005cc1dfc86bcf876af727bf560e7c02f516f47d..ea887a302d64b3e99ad5ec1f9df2fc530255bc02 100644
--- a/base/memory/discardable_memory_provider.h
+++ b/base/memory/discardable_memory_provider.h
@@ -55,8 +55,8 @@ class BASE_EXPORT_PRIVATE DiscardableMemoryProvider {
static void SetInstanceForTest(DiscardableMemoryProvider* provider);
// The maximum number of bytes of discardable memory that may be allocated
- // before we assume moderate memory pressure. If this amount is zero, it is
- // interpreted as having no limit at all.
+ // before we force a purge. If this amount is zero, it is interpreted as
+ // having no limit at all.
void SetDiscardableMemoryLimit(size_t bytes);
// Sets the amount of memory to reclaim when we're under moderate pressure.
@@ -110,8 +110,8 @@ class BASE_EXPORT_PRIVATE DiscardableMemoryProvider {
static void NotifyMemoryPressure(
MemoryPressureListener::MemoryPressureLevel pressure_level);
- // Purges least recently used memory based on the value of
- // |bytes_to_reclaim_under_moderate_pressure_|.
+ // Purges |bytes_to_reclaim_under_moderate_pressure_| bytes of
+ // discardable memory.
void Purge();
// Purges least recently used memory until usage is less or equal to |limit|.
« no previous file with comments | « no previous file | base/memory/discardable_memory_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698