| Index: base/memory/discardable_memory_manager.cc
|
| diff --git a/base/memory/discardable_memory_manager.cc b/base/memory/discardable_memory_manager.cc
|
| index 09e63e35f62ef852b04997cd15fde67f433fc6d0..cbbdb4770af04494f48290fb7bfae500e5496b47 100644
|
| --- a/base/memory/discardable_memory_manager.cc
|
| +++ b/base/memory/discardable_memory_manager.cc
|
| @@ -51,34 +51,6 @@ void DiscardableMemoryManager::SetHardMemoryLimitExpirationTime(
|
| hard_memory_limit_expiration_time_ = hard_memory_limit_expiration_time;
|
| }
|
|
|
| -void DiscardableMemoryManager::ReleaseFreeMemory() {
|
| - TRACE_EVENT0("base", "DiscardableMemoryManager::ReleaseFreeMemory");
|
| -
|
| - AutoLock lock(lock_);
|
| - size_t bytes_allocated_before_releasing_memory = bytes_allocated_;
|
| - for (auto& entry : allocations_) {
|
| - Allocation* allocation = entry.first;
|
| - AllocationInfo* info = &entry.second;
|
| -
|
| - if (!info->purgable)
|
| - continue;
|
| -
|
| - // Skip if memory is still resident, otherwise purge and adjust
|
| - // |bytes_allocated_|.
|
| - if (allocation->IsMemoryResident())
|
| - continue;
|
| -
|
| - size_t bytes_purgable = info->bytes;
|
| - DCHECK_LE(bytes_purgable, bytes_allocated_);
|
| - bytes_allocated_ -= bytes_purgable;
|
| - info->purgable = false;
|
| - allocation->Purge();
|
| - }
|
| -
|
| - if (bytes_allocated_ != bytes_allocated_before_releasing_memory)
|
| - BytesAllocatedChanged(bytes_allocated_);
|
| -}
|
| -
|
| bool DiscardableMemoryManager::ReduceMemoryUsage() {
|
| return PurgeIfNotUsedSinceHardLimitCutoffUntilWithinSoftMemoryLimit();
|
| }
|
|
|