| Index: memory/discardable_memory.h
|
| diff --git a/memory/discardable_memory.h b/memory/discardable_memory.h
|
| index fc189e746341136d0190e0329d3c375be8500af2..c64fc4f7cf37af8feddd50ace45fe496d2ffca48 100644
|
| --- a/memory/discardable_memory.h
|
| +++ b/memory/discardable_memory.h
|
| @@ -11,6 +11,11 @@
|
|
|
| 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
|
| // desktop devices where unused free memory should be used to help the user
|
| @@ -59,6 +64,14 @@ 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. The MemoryAllocatorDump created is owned by |pmd|. See
|
| + // ProcessMemoryDump::CreateAllocatorDump.
|
| + virtual trace_event::MemoryAllocatorDump* CreateMemoryAllocatorDump(
|
| + const char* name,
|
| + trace_event::ProcessMemoryDump* pmd) const = 0;
|
| };
|
|
|
| } // namespace base
|
|
|