OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "public/web/WebMemoryStatistics.h" | 5 #include "public/web/WebMemoryStatistics.h" |
6 | 6 |
7 #include "platform/heap/Handle.h" | 7 #include "platform/heap/Handle.h" |
8 #include "platform/wtf/allocator/Partitions.h" | 8 #include "platform/wtf/allocator/Partitions.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 29 matching lines...) Expand all Loading... |
40 WTF::Partitions::DumpMemoryStats(true, &dumper); | 40 WTF::Partitions::DumpMemoryStats(true, &dumper); |
41 statistics.partition_alloc_total_allocated_bytes = dumper.TotalActiveBytes(); | 41 statistics.partition_alloc_total_allocated_bytes = dumper.TotalActiveBytes(); |
42 | 42 |
43 statistics.blink_gc_total_allocated_bytes = | 43 statistics.blink_gc_total_allocated_bytes = |
44 ProcessHeap::TotalAllocatedObjectSize() + | 44 ProcessHeap::TotalAllocatedObjectSize() + |
45 ProcessHeap::TotalMarkedObjectSize(); | 45 ProcessHeap::TotalMarkedObjectSize(); |
46 return statistics; | 46 return statistics; |
47 } | 47 } |
48 | 48 |
49 } // namespace blink | 49 } // namespace blink |
OLD | NEW |