| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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.h" | 5 #include "base/memory/discardable_memory.h" |
| 6 | 6 |
| 7 #include <sys/mman.h> | 7 #include <sys/mman.h> |
| 8 #include <unistd.h> | 8 #include <unistd.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/posix/eintr_wrapper.h" | |
| 16 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
| 17 #include "third_party/ashmem/ashmem.h" | 16 #include "third_party/ashmem/ashmem.h" |
| 18 | 17 |
| 19 namespace base { | 18 namespace base { |
| 20 namespace { | 19 namespace { |
| 21 | 20 |
| 22 // Protects |g_num_discardable_memory| below. | 21 // Protects |g_num_discardable_memory| below. |
| 23 base::LazyInstance<base::Lock>::Leaky g_discardable_memory_lock = | 22 base::LazyInstance<base::Lock>::Leaky g_discardable_memory_lock = |
| 24 LAZY_INSTANCE_INITIALIZER; | 23 LAZY_INSTANCE_INITIALIZER; |
| 25 | 24 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 bool DiscardableMemory::PurgeForTestingSupported() { | 158 bool DiscardableMemory::PurgeForTestingSupported() { |
| 160 return false; | 159 return false; |
| 161 } | 160 } |
| 162 | 161 |
| 163 // static | 162 // static |
| 164 void DiscardableMemory::PurgeForTesting() { | 163 void DiscardableMemory::PurgeForTesting() { |
| 165 NOTIMPLEMENTED(); | 164 NOTIMPLEMENTED(); |
| 166 } | 165 } |
| 167 | 166 |
| 168 } // namespace base | 167 } // namespace base |
| OLD | NEW |