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

Issue 23231002: cc: Prevent the tile manager from allocating more memory than allowed. (Closed)

Created:
7 years, 4 months ago by reveman
Modified:
7 years, 4 months ago
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

cc: Prevent the tile manager from allocating more memory than allowed. This adds a new ReduceMemoryUsage function to the resource pool. By calling this function in TileManager::ScheduleTasks after creating all resources needed to to call RasterWorkerPool::ScheduleTasks we free enough unused resources to ensure that we never go above the limit. This also fixes the use of the num_resources_limit by correctly accounting for all allocated resources. BUG=273140 TEST=cc_unittests --gtest_filter=TileManagerTests/TileManagerTest.RespectMemoryLimit* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=217951

Patch Set 1 #

Total comments: 2

Patch Set 2 : s/resources_/unused_resources_/ #

Total comments: 4

Patch Set 3 : s/MemoryUsage/ResourceUsage/ #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -34 lines) Patch
M cc/resources/resource_pool.h View 1 2 2 chunks +12 lines, -7 lines 0 comments Download
M cc/resources/resource_pool.cc View 1 2 3 chunks +25 lines, -18 lines 0 comments Download
M cc/resources/tile_manager.cc View 1 2 3 3 chunks +9 lines, -4 lines 0 comments Download
M cc/resources/tile_manager_unittest.cc View 1 2 3 5 chunks +58 lines, -4 lines 0 comments Download
M cc/test/fake_tile_manager.cc View 2 chunks +22 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
reveman
7 years, 4 months ago (2013-08-15 00:53:31 UTC) #1
aelias_OOO_until_Jul13
lgtm, thanks. https://codereview.chromium.org/23231002/diff/1/cc/resources/resource_pool.h File cc/resources/resource_pool.h (right): https://codereview.chromium.org/23231002/diff/1/cc/resources/resource_pool.h#newcode74 cc/resources/resource_pool.h:74: ResourceList resources_; Please rename this to unused_resources_, ...
7 years, 4 months ago (2013-08-15 02:05:59 UTC) #2
reveman
https://codereview.chromium.org/23231002/diff/1/cc/resources/resource_pool.h File cc/resources/resource_pool.h (right): https://codereview.chromium.org/23231002/diff/1/cc/resources/resource_pool.h#newcode74 cc/resources/resource_pool.h:74: ResourceList resources_; On 2013/08/15 02:06:00, aelias wrote: > Please ...
7 years, 4 months ago (2013-08-15 15:14:14 UTC) #3
vmpstr
https://codereview.chromium.org/23231002/diff/6001/cc/resources/resource_pool.cc File cc/resources/resource_pool.cc (right): https://codereview.chromium.org/23231002/diff/6001/cc/resources/resource_pool.cc#newcode118 cc/resources/resource_pool.cc:118: bool ResourcePool::MemoryUsageTooHigh() { nit: This should probably be ResourceUsageTooHigh ...
7 years, 4 months ago (2013-08-15 18:26:36 UTC) #4
reveman
https://codereview.chromium.org/23231002/diff/6001/cc/resources/resource_pool.cc File cc/resources/resource_pool.cc (right): https://codereview.chromium.org/23231002/diff/6001/cc/resources/resource_pool.cc#newcode118 cc/resources/resource_pool.cc:118: bool ResourcePool::MemoryUsageTooHigh() { On 2013/08/15 18:26:37, vmpstr wrote: > ...
7 years, 4 months ago (2013-08-15 19:13:55 UTC) #5
vmpstr
> So at this point we've already requested all resources that can be used by ...
7 years, 4 months ago (2013-08-15 19:37:35 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/23231002/18001
7 years, 4 months ago (2013-08-15 20:24:29 UTC) #7
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) nacl_integration http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=188091
7 years, 4 months ago (2013-08-15 23:37:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/23231002/35002
7 years, 4 months ago (2013-08-16 01:17:09 UTC) #9
commit-bot: I haz the power
7 years, 4 months ago (2013-08-16 05:48:01 UTC) #10
Message was sent while issue was closed.
Change committed as 217951

Powered by Google App Engine
This is Rietveld 408576698