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

Side by Side Diff: base/memory/discardable_memory.h

Issue 651913003: base: Remove non-caching discardable memory implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 months 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/base.gypi ('k') | base/memory/discardable_memory.cc » ('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 (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 #ifndef BASE_MEMORY_DISCARDABLE_MEMORY_H_ 5 #ifndef BASE_MEMORY_DISCARDABLE_MEMORY_H_
6 #define BASE_MEMORY_DISCARDABLE_MEMORY_H_ 6 #define BASE_MEMORY_DISCARDABLE_MEMORY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/base_export.h" 11 #include "base/base_export.h"
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 15
16 namespace base { 16 namespace base {
17 17
18 enum DiscardableMemoryType { 18 enum DiscardableMemoryType {
19 DISCARDABLE_MEMORY_TYPE_NONE, 19 DISCARDABLE_MEMORY_TYPE_NONE,
20 DISCARDABLE_MEMORY_TYPE_ASHMEM, 20 DISCARDABLE_MEMORY_TYPE_ASHMEM,
21 DISCARDABLE_MEMORY_TYPE_MAC, 21 DISCARDABLE_MEMORY_TYPE_MAC,
22 DISCARDABLE_MEMORY_TYPE_EMULATED, 22 DISCARDABLE_MEMORY_TYPE_EMULATED
23 DISCARDABLE_MEMORY_TYPE_MALLOC
24 }; 23 };
25 24
26 enum DiscardableMemoryLockStatus { 25 enum DiscardableMemoryLockStatus {
27 DISCARDABLE_MEMORY_LOCK_STATUS_FAILED, 26 DISCARDABLE_MEMORY_LOCK_STATUS_FAILED,
28 DISCARDABLE_MEMORY_LOCK_STATUS_PURGED, 27 DISCARDABLE_MEMORY_LOCK_STATUS_PURGED,
29 DISCARDABLE_MEMORY_LOCK_STATUS_SUCCESS 28 DISCARDABLE_MEMORY_LOCK_STATUS_SUCCESS
30 }; 29 };
31 30
32 // Platform abstraction for discardable memory. DiscardableMemory is used to 31 // Platform abstraction for discardable memory. DiscardableMemory is used to
33 // cache large objects without worrying about blowing out memory, both on mobile 32 // cache large objects without worrying about blowing out memory, both on mobile
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // Testing utility calls. 117 // Testing utility calls.
119 118
120 // Purge all discardable memory in the system. This call has global effects 119 // Purge all discardable memory in the system. This call has global effects
121 // across all running processes, so it should only be used for testing! 120 // across all running processes, so it should only be used for testing!
122 static void PurgeForTesting(); 121 static void PurgeForTesting();
123 }; 122 };
124 123
125 } // namespace base 124 } // namespace base
126 125
127 #endif // BASE_MEMORY_DISCARDABLE_MEMORY_H_ 126 #endif // BASE_MEMORY_DISCARDABLE_MEMORY_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/memory/discardable_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698