Chromium Code Reviews| Index: Source/wtf/PartitionAlloc.h |
| diff --git a/Source/wtf/PartitionAlloc.h b/Source/wtf/PartitionAlloc.h |
| index 1db9ab68245ce91cc9bd38dcd2886a8fc35b3603..db515d510fc2f6cbc812784c8e44709f20e1a2a5 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 says OutOfMemory. |
|
haraken
2015/09/04 06:14:48
when PartitionAlloc hits OOM
tasak
2015/09/04 06:32:42
Done.
|
| + 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*); |