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

Unified Diff: Source/wtf/Partitions.h

Issue 1053793004: Add a UseCounter that measures the amount of memory used in PartitionAlloc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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/wtf/PartitionAlloc.cpp ('k') | Source/wtf/Partitions.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/Partitions.h
diff --git a/Source/wtf/Partitions.h b/Source/wtf/Partitions.h
index fc411616fccc2217b760e76ba251a9846ff87291..627f39c4608e583d5bdab3d959258fc30be1f7a6 100644
--- a/Source/wtf/Partitions.h
+++ b/Source/wtf/Partitions.h
@@ -32,13 +32,14 @@
#define Partitions_h
#include "wtf/PartitionAlloc.h"
+#include "wtf/WTF.h"
#include "wtf/WTFExport.h"
namespace WTF {
class WTF_EXPORT Partitions {
public:
- static void initialize();
+ static void initialize(HistogramEnumerationFunction = nullptr);
static void shutdown();
ALWAYS_INLINE static PartitionRootGeneric* getBufferPartition()
{
@@ -87,12 +88,15 @@ public:
return totalSize;
}
+ static void reportMemoryUsageHistogram();
+
private:
static bool s_initialized;
static PartitionAllocatorGeneric m_fastMallocAllocator;
static PartitionAllocatorGeneric m_bufferAllocator;
static SizeSpecificPartitionAllocator<3328> m_objectModelAllocator;
static SizeSpecificPartitionAllocator<1024> m_renderingAllocator;
+ static HistogramEnumerationFunction m_histogramEnumeration;
};
} // namespace WTF
« no previous file with comments | « Source/wtf/PartitionAlloc.cpp ('k') | Source/wtf/Partitions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698