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*); |