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

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
Index: Source/wtf/Partitions.h
diff --git a/Source/wtf/Partitions.h b/Source/wtf/Partitions.h
index fc411616fccc2217b760e76ba251a9846ff87291..54f01b2280edaccfdd54466be1bf737fbe650282 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 notifyCommittedMemoryChanged();
+
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

Powered by Google App Engine
This is Rietveld 408576698