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

Side by Side Diff: base/memory/discardable_memory_mach.cc

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/memory/discardable_memory_mach.h ('k') | base/memory/discardable_memory_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/memory/discardable_memory_mach.h" 5 #include "base/memory/discardable_memory_mach.h"
6 6
7 #include <mach/mach.h> 7 #include <mach/mach.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 ret = vm_protect( 147 ret = vm_protect(
148 mach_task_self(), memory_.address(), memory_.size(), FALSE, VM_PROT_NONE); 148 mach_task_self(), memory_.address(), memory_.size(), FALSE, VM_PROT_NONE);
149 MACH_DCHECK(ret == KERN_SUCCESS, ret) << "vm_protect"; 149 MACH_DCHECK(ret == KERN_SUCCESS, ret) << "vm_protect";
150 #endif 150 #endif
151 } 151 }
152 152
153 void DiscardableMemoryMach::Purge() { 153 void DiscardableMemoryMach::Purge() {
154 memory_.reset(); 154 memory_.reset();
155 } 155 }
156 156
157 bool DiscardableMemoryMach::IsMemoryResident() const {
158 return true;
159 }
160
157 } // namespace internal 161 } // namespace internal
158 } // namespace base 162 } // namespace base
OLDNEW
« no previous file with comments | « base/memory/discardable_memory_mach.h ('k') | base/memory/discardable_memory_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698