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

Issue 59083011: base: Avoid purging more discardable memory than necessary. (Closed)

Created:
7 years, 1 month ago by reveman
Modified:
7 years, 1 month ago
CC:
chromium-reviews, erikwright+watch_chromium.org, gavinp+memory_chromium.org
Visibility:
Public.

Description

base: Avoid purging more discardable memory than necessary. In situations when discardable memory usage is above the limit, instead of purging the amount of memory that we would try to reclaim under moderate memory pressure, purge only what is necessary to stay below the limit. This simplifies the code and makes it easier to understand how memory is purged as a result of reaching the memory limit. BUG=237681 TEST=base_unittests --gtest_filter=DiscardableMemoryProviderPermutationTests/DiscardableMemoryProviderPermutationTest.LRUDiscardedAmount/* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=234652

Patch Set 1 #

Total comments: 2

Patch Set 2 : better comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -17 lines) Patch
M base/memory/discardable_memory_provider.h View 1 2 chunks +4 lines, -4 lines 0 comments Download
M base/memory/discardable_memory_provider.cc View 3 chunks +2 lines, -13 lines 0 comments Download
M base/memory/discardable_memory_provider_unittest.cc View 1 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
reveman
I think this simplifies the code a bit and makes it easier to reason with ...
7 years, 1 month ago (2013-11-05 23:17:13 UTC) #1
Ian Vollick
On 2013/11/05 23:17:13, David Reveman wrote: > I think this simplifies the code a bit ...
7 years, 1 month ago (2013-11-06 14:35:13 UTC) #2
reveman
ping
7 years, 1 month ago (2013-11-11 20:28:52 UTC) #3
willchan no longer on Chromium
Reviewing now. First thing...please update the CL description to explain why this change is being ...
7 years, 1 month ago (2013-11-12 17:22:59 UTC) #4
willchan no longer on Chromium
lgtm https://codereview.chromium.org/59083011/diff/1/base/memory/discardable_memory_provider.h File base/memory/discardable_memory_provider.h (right): https://codereview.chromium.org/59083011/diff/1/base/memory/discardable_memory_provider.h#newcode114 base/memory/discardable_memory_provider.h:114: // |bytes_to_reclaim_under_moderate_pressure_|. Maybe we should add better comments ...
7 years, 1 month ago (2013-11-12 17:34:25 UTC) #5
reveman
Updated description and comment. https://codereview.chromium.org/59083011/diff/1/base/memory/discardable_memory_provider.h File base/memory/discardable_memory_provider.h (right): https://codereview.chromium.org/59083011/diff/1/base/memory/discardable_memory_provider.h#newcode114 base/memory/discardable_memory_provider.h:114: // |bytes_to_reclaim_under_moderate_pressure_|. On 2013/11/12 17:34:26, ...
7 years, 1 month ago (2013-11-12 20:38:11 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/59083011/90001
7 years, 1 month ago (2013-11-12 20:42:23 UTC) #7
commit-bot: I haz the power
7 years, 1 month ago (2013-11-12 22:43:25 UTC) #8
Message was sent while issue was closed.
Change committed as 234652

Powered by Google App Engine
This is Rietveld 408576698