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

Issue 285493004: [Mac] A couple of improvements for DiscardableMemory (Closed)

Created:
6 years, 7 months ago by Mark Mentovai
Modified:
6 years, 7 months ago
Reviewers:
reveman
CC:
chromium-reviews, erikwright+watch_chromium.org, gavinp+memory_chromium.org
Visibility:
Public.

Description

A couple of incremental improvements for DiscardableMemory. Unify DCHECKs so that implementation is_locked_ refers uniformly to the client's perspective, not the underlying implementation's perspective or the manager's perspective. Unify Initialize methods to check for "not failed" instead of a particular form of success. Don't reset page protection to default after a fresh allocation, which already delivers pages with default protection. R=reveman@chromium.org, reveman Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270135

Patch Set 1 : #

Total comments: 4

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -19 lines) Patch
M base/memory/discardable_memory_ashmem.cc View 1 2 chunks +8 lines, -8 lines 0 comments Download
M base/memory/discardable_memory_emulated.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M base/memory/discardable_memory_mac.cc View 1 4 chunks +17 lines, -9 lines 0 comments Download
M base/memory/discardable_memory_malloc.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
Mark Mentovai
6 years, 7 months ago (2014-05-12 19:22:19 UTC) #1
reveman
https://codereview.chromium.org/285493004/diff/20001/base/memory/discardable_memory_mac.cc File base/memory/discardable_memory_mac.cc (right): https://codereview.chromium.org/285493004/diff/20001/base/memory/discardable_memory_mac.cc#newcode50 base/memory/discardable_memory_mac.cc:50: bool Initialize() { return Lock() != DISCARDABLE_MEMORY_LOCK_STATUS_FAILED; } Can ...
6 years, 7 months ago (2014-05-12 20:57:44 UTC) #2
Mark Mentovai
https://codereview.chromium.org/285493004/diff/20001/base/memory/discardable_memory_mac.cc File base/memory/discardable_memory_mac.cc (right): https://codereview.chromium.org/285493004/diff/20001/base/memory/discardable_memory_mac.cc#newcode50 base/memory/discardable_memory_mac.cc:50: bool Initialize() { return Lock() != DISCARDABLE_MEMORY_LOCK_STATUS_FAILED; } reveman ...
6 years, 7 months ago (2014-05-12 21:35:49 UTC) #3
Mark Mentovai
OK, I’m just going to use this CL to make the incremental improvements we discussed, ...
6 years, 7 months ago (2014-05-13 15:59:01 UTC) #4
reveman
lgtm
6 years, 7 months ago (2014-05-13 16:01:32 UTC) #5
Mark Mentovai
6 years, 7 months ago (2014-05-13 17:40:58 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 manually as r270135 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698