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

Side by Side Diff: base/memory/discardable_memory_malloc.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/memory/discardable_memory_mac.cc ('k') | base/memory/discardable_memory_malloc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BASE_MEMORY_DISCARDABLE_MEMORY_MALLOC_H_
6 #define BASE_MEMORY_DISCARDABLE_MEMORY_MALLOC_H_
7
8 #include "base/memory/discardable_memory.h"
9
10 namespace base {
11 namespace internal {
12
13 class DiscardableMemoryMalloc : public DiscardableMemory {
14 public:
15 explicit DiscardableMemoryMalloc(size_t size);
16 virtual ~DiscardableMemoryMalloc();
17
18 bool Initialize();
19
20 // Overridden from DiscardableMemory:
21 virtual DiscardableMemoryLockStatus Lock() override;
22 virtual void Unlock() override;
23 virtual void* Memory() const override;
24
25 private:
26 scoped_ptr<uint8, FreeDeleter> memory_;
27 const size_t size_;
28
29 DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryMalloc);
30 };
31
32 } // namespace internal
33 } // namespace base
34
35 #endif // BASE_MEMORY_DISCARDABLE_MEMORY_MALLOC_H_
OLDNEW
« no previous file with comments | « base/memory/discardable_memory_mac.cc ('k') | base/memory/discardable_memory_malloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698