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

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

Issue 17106004: Add discardable memory emulation for non-android/mac platforms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix MemoryAfterUnlock test Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/memory/discardable_memory.h"
6
7 #include "base/compiler_specific.h"
8 #include "base/logging.h"
9
10 namespace base {
11
12 // Stub implementations for platforms that don't support discardable memory.
13
14 #if !defined(OS_ANDROID) && !defined(OS_MACOSX)
15
16 // static
17 bool DiscardableMemory::Supported() {
18 return false;
19 }
20
21 // static
22 scoped_ptr<DiscardableMemory> DiscardableMemory::CreateLockedMemory(
23 size_t size) {
24 return scoped_ptr<DiscardableMemory>();
25 }
26
27 // static
28 bool DiscardableMemory::PurgeForTestingSupported() {
29 return false;
30 }
31
32 // static
33 void DiscardableMemory::PurgeForTesting() {
34 NOTIMPLEMENTED();
35 }
36
37 #endif // OS_*
38
39 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698