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

Issue 183763037: Update AshmemRegion::highest_allocated_chunk_ when merging free chunks. (Closed)

Created:
6 years, 9 months ago by Philippe
Modified:
6 years, 9 months ago
Reviewers:
pasko, Mark Mentovai
CC:
chromium-reviews, erikwright+watch_chromium.org, gavinp+memory_chromium.org, Ken Russell (switch to Gerrit)
Visibility:
Public.

Description

Update AshmemRegion::highest_allocated_chunk_ when merging free chunks. This is a follow up of r254755 that updated the pointer to the chunk with the highest address in the region when the highest chunk in the region was being split (during an allocation reusing a free chunk). While this was enough to fix the bug specified below, it was only partly addressing the problem since this pointer also needs to be updated when free chunks are merged. This CL fixes this issue and adds an extra DCHECK() exposing the problem with the existing unit tests. BUG=347919 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255691

Patch Set 1 #

Total comments: 3

Patch Set 2 : Remove unnecessary allocator instance in unit test #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -3 lines) Patch
M base/memory/discardable_memory_allocator_android.cc View 6 chunks +28 lines, -1 line 0 comments Download
M base/memory/discardable_memory_allocator_android_unittest.cc View 1 1 chunk +0 lines, -2 lines 1 comment Download

Messages

Total messages: 11 (0 generated)
Philippe
https://codereview.chromium.org/183763037/diff/1/base/memory/discardable_memory_allocator_android.cc File base/memory/discardable_memory_allocator_android.cc (right): https://codereview.chromium.org/183763037/diff/1/base/memory/discardable_memory_allocator_android.cc#newcode161 base/memory/discardable_memory_allocator_android.cc:161: FYI, I'm adding those blank lines to improve readability. ...
6 years, 9 months ago (2014-03-05 12:42:46 UTC) #1
pasko
LGTM++ https://codereview.chromium.org/183763037/diff/1/base/memory/discardable_memory_allocator_android.cc File base/memory/discardable_memory_allocator_android.cc (right): https://codereview.chromium.org/183763037/diff/1/base/memory/discardable_memory_allocator_android.cc#newcode161 base/memory/discardable_memory_allocator_android.cc:161: On 2014/03/05 12:42:46, Philippe wrote: > FYI, I'm ...
6 years, 9 months ago (2014-03-05 13:36:48 UTC) #2
Philippe
Thanks Egor! https://codereview.chromium.org/183763037/diff/1/base/memory/discardable_memory_allocator_android.cc File base/memory/discardable_memory_allocator_android.cc (right): https://codereview.chromium.org/183763037/diff/1/base/memory/discardable_memory_allocator_android.cc#newcode161 base/memory/discardable_memory_allocator_android.cc:161: On 2014/03/05 13:36:48, pasko wrote: > On ...
6 years, 9 months ago (2014-03-05 13:39:11 UTC) #3
Philippe
Hi Mark, I just realized that r254755 wasn't fully addressing the issue (although it was ...
6 years, 9 months ago (2014-03-05 14:10:39 UTC) #4
Philippe
https://codereview.chromium.org/183763037/diff/20001/base/memory/discardable_memory_allocator_android_unittest.cc File base/memory/discardable_memory_allocator_android_unittest.cc (left): https://codereview.chromium.org/183763037/diff/20001/base/memory/discardable_memory_allocator_android_unittest.cc#oldcode274 base/memory/discardable_memory_allocator_android_unittest.cc:274: DiscardableMemoryAllocator allocator_(kAllocatorName, 32 * kPageSize); FYI, I just uploaded ...
6 years, 9 months ago (2014-03-05 15:36:02 UTC) #5
Philippe
Ping Mark :)
6 years, 9 months ago (2014-03-07 13:42:21 UTC) #6
Mark Mentovai
LGTM. Sorry, I must have missed the original review request.
6 years, 9 months ago (2014-03-07 16:38:12 UTC) #7
Philippe
On 2014/03/07 16:38:12, Mark Mentovai wrote: > LGTM. Sorry, I must have missed the original ...
6 years, 9 months ago (2014-03-07 16:44:30 UTC) #8
Philippe
The CQ bit was checked by pliard@chromium.org
6 years, 9 months ago (2014-03-07 16:44:34 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pliard@chromium.org/183763037/20001
6 years, 9 months ago (2014-03-07 16:46:11 UTC) #10
commit-bot: I haz the power
6 years, 9 months ago (2014-03-07 19:52:15 UTC) #11
Message was sent while issue was closed.
Change committed as 255691

Powered by Google App Engine
This is Rietveld 408576698