Index: base/memory/discardable_memory_manager.h |
diff --git a/base/memory/discardable_memory_manager.h b/base/memory/discardable_memory_manager.h |
index 43737f82778d942672d1d92f0303a4b802068b06..8bf92891a3ea967d897053f138d09030de808e62 100644 |
--- a/base/memory/discardable_memory_manager.h |
+++ b/base/memory/discardable_memory_manager.h |
@@ -31,6 +31,10 @@ class DiscardableMemoryManagerAllocation { |
// is acquired on the allocation. |
virtual void Purge() = 0; |
+ // Check if allocated memory is still resident. It is illegal to call this |
+ // while a lock is acquired on the allocation. |
+ virtual bool IsMemoryResident() const = 0; |
+ |
protected: |
virtual ~DiscardableMemoryManagerAllocation() {} |
}; |
@@ -68,6 +72,9 @@ class BASE_EXPORT_PRIVATE DiscardableMemoryManager { |
void SetHardMemoryLimitExpirationTime( |
TimeDelta hard_memory_limit_expiration_time); |
+ // This will make sure that all purged memory is released to the OS. |
+ void ReleaseFreeMemory(); |
+ |
// This will attempt to reduce memory footprint until within soft memory |
// limit. Returns true if there's no need to call this again until allocations |
// have been used. |