| Index: base/memory/discardable_memory.h
|
| diff --git a/base/memory/discardable_memory.h b/base/memory/discardable_memory.h
|
| index fc189e746341136d0190e0329d3c375be8500af2..af27b7b6d0f6f5ec2b84f6e1eb1c0e9823cf1dba 100644
|
| --- a/base/memory/discardable_memory.h
|
| +++ b/base/memory/discardable_memory.h
|
| @@ -10,6 +10,10 @@
|
| #include "base/compiler_specific.h"
|
|
|
| namespace base {
|
| +namespace trace_event {
|
| +class MemoryAllocatorDump;
|
| +class ProcessMemoryDump;
|
| +}
|
|
|
| // Discardable memory is used to cache large objects without worrying about
|
| // blowing out memory, both on mobile devices where there is no swap, and
|
| @@ -59,6 +63,13 @@ class BASE_EXPORT DiscardableMemory {
|
| template<typename T> T* data_as() const {
|
| return reinterpret_cast<T*>(data());
|
| }
|
| +
|
| + // Used for dumping the statistics of discardable memory allocated in tracing.
|
| + // Returns a new MemoryAllocatorDump in the |pmd| with the size of the
|
| + // discardable memory. See ProcessMemoryDump::CreateAllocatorDump.
|
| + virtual trace_event::MemoryAllocatorDump* CreateMemoryAllocatorDump(
|
| + const char* name,
|
| + trace_event::ProcessMemoryDump* pmd) = 0;
|
| };
|
|
|
| } // namespace base
|
|
|