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

Unified Diff: Source/platform/Partitions.h

Issue 301743006: Report DOM partitionAlloc size to V8 GC. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add unittest / fix windows Created 6 years, 6 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 | « Source/bindings/v8/V8GCController.cpp ('k') | Source/web/WebKit.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/Partitions.h
diff --git a/Source/platform/Partitions.h b/Source/platform/Partitions.h
index c589220f5fca4620c9c167a17dc47939030f9bab..e1dd2eddd4ce95c6e2367eabd2c8bce62d4d388e 100644
--- a/Source/platform/Partitions.h
+++ b/Source/platform/Partitions.h
@@ -44,6 +44,11 @@ public:
ALWAYS_INLINE static PartitionRoot* getObjectModelPartition() { return m_objectModelAllocator.root(); }
ALWAYS_INLINE static PartitionRoot* getRenderingPartition() { return m_renderingAllocator.root(); }
+ static size_t currentDOMMemoryUsage()
+ {
+ return m_objectModelAllocator.root()->totalSizeOfCommittedPages;
+ }
+
private:
static SizeSpecificPartitionAllocator<3072> m_objectModelAllocator;
static SizeSpecificPartitionAllocator<1024> m_renderingAllocator;
« no previous file with comments | « Source/bindings/v8/V8GCController.cpp ('k') | Source/web/WebKit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698