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

Unified Diff: third_party/WebKit/Source/core/exported/WebMemoryStatistics.cpp

Issue 2948983002: Low memory page navigation GC for low end devices (Closed)
Patch Set: fix Created 3 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: third_party/WebKit/Source/core/exported/WebMemoryStatistics.cpp
diff --git a/third_party/WebKit/Source/core/exported/WebMemoryStatistics.cpp b/third_party/WebKit/Source/core/exported/WebMemoryStatistics.cpp
index 465a85aba5907abe67efdb2c34a8c0513404c994..d1800ac80695478bc262c7d050318f5cbffb2716 100644
--- a/third_party/WebKit/Source/core/exported/WebMemoryStatistics.cpp
+++ b/third_party/WebKit/Source/core/exported/WebMemoryStatistics.cpp
@@ -9,37 +9,10 @@
namespace blink {
-namespace {
-
-class LightPartitionStatsDumperImpl : public WTF::PartitionStatsDumper {
- public:
- LightPartitionStatsDumperImpl() : total_active_bytes_(0) {}
-
- void PartitionDumpTotals(
- const char* partition_name,
- const WTF::PartitionMemoryStats* memory_stats) override {
- total_active_bytes_ += memory_stats->total_active_bytes;
- }
-
- void PartitionsDumpBucketStats(
- const char* partition_name,
- const WTF::PartitionBucketMemoryStats*) override {}
-
- size_t TotalActiveBytes() const { return total_active_bytes_; }
-
- private:
- size_t total_active_bytes_;
-};
-
-} // namespace
-
WebMemoryStatistics WebMemoryStatistics::Get() {
- LightPartitionStatsDumperImpl dumper;
WebMemoryStatistics statistics;
-
- WTF::Partitions::DumpMemoryStats(true, &dumper);
- statistics.partition_alloc_total_allocated_bytes = dumper.TotalActiveBytes();
-
+ statistics.partition_alloc_total_allocated_bytes =
+ WTF::Partitions::TotalActiveBytes();
statistics.blink_gc_total_allocated_bytes =
ProcessHeap::TotalAllocatedObjectSize() +
ProcessHeap::TotalMarkedObjectSize();
« no previous file with comments | « third_party/WebKit/Source/core/exported/WebFrame.cpp ('k') | third_party/WebKit/Source/platform/wtf/allocator/Partitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698