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

Unified Diff: Source/wtf/PartitionAlloc.h

Issue 1315113006: Add partitionsOutOfMemoryUsingXXX to know Blink memory usage from OOM crash reports (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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.h
diff --git a/Source/wtf/PartitionAlloc.h b/Source/wtf/PartitionAlloc.h
index 1db9ab68245ce91cc9bd38dcd2886a8fc35b3603..f37e146e58f5843e09981a3291a31e952d8c6b89 100644
--- a/Source/wtf/PartitionAlloc.h
+++ b/Source/wtf/PartitionAlloc.h
@@ -316,6 +316,10 @@ struct WTF_EXPORT PartitionRootBase {
// that.
static PartitionPage gSeedPage;
static PartitionBucket gPagedBucket;
+ // gMemoryUsageReportFunction is used to know how much memory Blink
+ // has already allocated when OOM occurrs.
+ // Currently Partitions registers this function.
+ static size_t (*gMemoryUsageReportFunction)();
haraken 2015/09/04 05:22:45 Instead of exporting gMemoryUsageReportFunction, h
tasak 2015/09/04 06:12:06 Done.
};
// Never instantiate a PartitionRoot directly, instead use PartitionAlloc.
@@ -383,6 +387,7 @@ public:
virtual void partitionsDumpBucketStats(const char* partitionName, const PartitionBucketMemoryStats*) = 0;
};
+WTF_EXPORT void partitionAllocGlobalInit(size_t (*memoryUsageReportFunc)());
WTF_EXPORT void partitionAllocInit(PartitionRoot*, size_t numBuckets, size_t maxAllocation);
WTF_EXPORT bool partitionAllocShutdown(PartitionRoot*);
WTF_EXPORT void partitionAllocGenericInit(PartitionRootGeneric*);
« Source/wtf/Alias.cpp ('K') | « Source/wtf/Alias.cpp ('k') | Source/wtf/PartitionAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698