Chromium Code Reviews| 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*); |