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

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: Patch for landing 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
« no previous file with comments | « Source/wtf/Alias.cpp ('k') | Source/wtf/PartitionAlloc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/PartitionAlloc.h
diff --git a/Source/wtf/PartitionAlloc.h b/Source/wtf/PartitionAlloc.h
index 1db9ab68245ce91cc9bd38dcd2886a8fc35b3603..b0e233f4e2d24a442be2936fc08401c1fddc2866 100644
--- a/Source/wtf/PartitionAlloc.h
+++ b/Source/wtf/PartitionAlloc.h
@@ -316,6 +316,8 @@ struct WTF_EXPORT PartitionRootBase {
// that.
static PartitionPage gSeedPage;
static PartitionBucket gPagedBucket;
+ // gOomHandlingFunction is invoked when ParitionAlloc hits OutOfMemory.
+ static void (*gOomHandlingFunction)();
};
// Never instantiate a PartitionRoot directly, instead use PartitionAlloc.
@@ -383,6 +385,7 @@ public:
virtual void partitionsDumpBucketStats(const char* partitionName, const PartitionBucketMemoryStats*) = 0;
};
+WTF_EXPORT void partitionAllocGlobalInit(void (*oomHandlingFunction)());
WTF_EXPORT void partitionAllocInit(PartitionRoot*, size_t numBuckets, size_t maxAllocation);
WTF_EXPORT bool partitionAllocShutdown(PartitionRoot*);
WTF_EXPORT void partitionAllocGenericInit(PartitionRootGeneric*);
« no previous file with comments | « Source/wtf/Alias.cpp ('k') | Source/wtf/PartitionAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698