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

Unified Diff: Source/wtf/PartitionAlloc.cpp

Issue 16896019: Replace RenderArena with PartitionAlloc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
Index: Source/wtf/PartitionAlloc.cpp
diff --git a/Source/wtf/PartitionAlloc.cpp b/Source/wtf/PartitionAlloc.cpp
index 47c06083b6b6e6cdfedba4bf6da6b415b2e64299..e2d122ef221edb23ec43b2d949eaf16940cb04f4 100644
--- a/Source/wtf/PartitionAlloc.cpp
+++ b/Source/wtf/PartitionAlloc.cpp
@@ -317,6 +317,23 @@ void partitionFreeSlowPath(PartitionPageHeader* page)
}
}
+size_t partitionAllocGetUsedPagesSize(const PartitionRoot& root)
+{
+ size_t total = 0;
+ size_t i;
+ for (i = 0; i < kNumBuckets; ++i) {
+ const PartitionBucket& bucket = root.buckets[i];
+ total += bucket.numFullPages * kPartitionPageSize;
+ const PartitionPageHeader* page = bucket.currPage;
+ do {
+ if (page != &bucket.root->seedPage)
+ total += kPartitionPageSize;
+ page = page->next;
+ } while (page != bucket.currPage);
+ }
+ return total;
+}
+
#ifndef NDEBUG
void partitionDumpStats(const PartitionRoot& root)
« Source/core/rendering/RenderWidgetProtector.h ('K') | « Source/wtf/PartitionAlloc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698