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

Unified Diff: base/memory/discardable_memory_malloc.h

Issue 145643008: base: Add uncached malloc based discardable memory type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/discardable_memory_malloc.h
diff --git a/base/memory/discardable_memory_emulated.h b/base/memory/discardable_memory_malloc.h
similarity index 51%
copy from base/memory/discardable_memory_emulated.h
copy to base/memory/discardable_memory_malloc.h
index 20144ff25f016a50c5810892f3be265b542fc165..df034bd8ae088bb6da37a844666072c379823133 100644
--- a/base/memory/discardable_memory_emulated.h
+++ b/base/memory/discardable_memory_malloc.h
@@ -2,23 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_MEMORY_DISCARDABLE_MEMORY_EMULATED_H_
-#define BASE_MEMORY_DISCARDABLE_MEMORY_EMULATED_H_
+#ifndef BASE_MEMORY_DISCARDABLE_MEMORY_MALLOC_H_
+#define BASE_MEMORY_DISCARDABLE_MEMORY_MALLOC_H_
#include "base/memory/discardable_memory.h"
namespace base {
namespace internal {
-class DiscardableMemoryEmulated : public DiscardableMemory {
+class DiscardableMemoryMalloc : public DiscardableMemory {
public:
- explicit DiscardableMemoryEmulated(size_t size);
- virtual ~DiscardableMemoryEmulated();
-
- static void RegisterMemoryPressureListeners();
- static void UnregisterMemoryPressureListeners();
-
- static void PurgeForTesting();
+ explicit DiscardableMemoryMalloc(size_t size);
+ virtual ~DiscardableMemoryMalloc();
bool Initialize();
@@ -29,12 +24,12 @@ class DiscardableMemoryEmulated : public DiscardableMemory {
private:
scoped_ptr<uint8, FreeDeleter> memory_;
- bool is_locked_;
+ const size_t size_;
- DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryEmulated);
+ DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryMalloc);
};
} // namespace internal
} // namespace base
-#endif // BASE_MEMORY_DISCARDABLE_MEMORY_EMULATED_H_
+#endif // BASE_MEMORY_DISCARDABLE_MEMORY_MALLOC_H_
« 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