Chromium Code Reviews| Index: base/memory/discardable_memory_allocator.h |
| diff --git a/base/memory/discardable_memory_allocator.h b/base/memory/discardable_memory_allocator.h |
| index 400f87aeee0d49f7b1699ac0d4ed420f2388ca45..577fd6872e37c35176c9fe3e56fafb83f401af07 100644 |
| --- a/base/memory/discardable_memory_allocator.h |
| +++ b/base/memory/discardable_memory_allocator.h |
| @@ -9,6 +9,10 @@ |
| #include "base/memory/scoped_ptr.h" |
| namespace base { |
| +namespace trace_event { |
| +class ProcessMemoryDump; |
| +} |
| + |
| class DiscardableMemory; |
| class BASE_EXPORT DiscardableMemoryAllocator { |
| @@ -23,8 +27,20 @@ class BASE_EXPORT DiscardableMemoryAllocator { |
| virtual scoped_ptr<DiscardableMemory> AllocateLockedDiscardableMemory( |
| size_t size) = 0; |
| + // Used by other allocators to expess sub-allocation from discardable memory |
|
reveman
2015/07/30 21:27:56
express
ssid
2015/07/31 12:59:40
Done.
|
| + // heap for tracing. To expess any suballocation, the dump providers need to |
| + // create a sub-allocation edge from this node. |
| + // E.g.: ProcessMemoryDump::AddSuballocation(skia_dump_guid, |
| + // GetMemoryPoolNameForTracing()); |
|
reveman
2015/07/30 21:27:56
Not sure we need this much detail in this comment.
ssid
2015/07/31 12:59:40
Done.
|
| + static const char* GetMemoryPoolNameForTracing(); |
| + |
| protected: |
| virtual ~DiscardableMemoryAllocator() {} |
| + |
| + // Used by the discqardable allocator implementation to create the memory dump |
| + // of the memory pool, for tracing. |
| + static void CreateMemoryPoolDumpForTracing( |
| + trace_event::ProcessMemoryDump* pmd); |
|
reveman
2015/07/30 21:27:56
Not sure it's worth having this here just for code
ssid
2015/07/31 12:59:40
Moved it to the impl. Thanks
|
| }; |
| } // namespace base |