| Index: Source/wtf/PartitionAlloc.h
|
| diff --git a/Source/wtf/PartitionAlloc.h b/Source/wtf/PartitionAlloc.h
|
| index 92fa182d31e763fdcc8388e1c233ce587e6255d0..7c3d8e443e6d2e89677ed7106070375b8e36ca06 100644
|
| --- a/Source/wtf/PartitionAlloc.h
|
| +++ b/Source/wtf/PartitionAlloc.h
|
| @@ -183,6 +183,8 @@ static const size_t kGenericMaxBucketSpacing = 1 << ((kGenericMaxBucketedOrder -
|
| static const size_t kGenericMaxBucketed = (1 << (kGenericMaxBucketedOrder - 1)) + ((kGenericNumBucketsPerOrder - 1) * kGenericMaxBucketSpacing);
|
| static const size_t kBitsPerSizet = sizeof(void*) * CHAR_BIT;
|
|
|
| +// Constants for the memory reclaim logic.
|
| +static const size_t kMaxFreeableSpans = 16;
|
|
|
| #ifndef NDEBUG
|
| // These two byte values match tcmalloc.
|
| @@ -195,8 +197,8 @@ static const uintptr_t kCookieValue = 0xDEADBEEFu;
|
| #endif
|
| #endif
|
|
|
| -struct PartitionRootBase;
|
| struct PartitionBucket;
|
| +struct PartitionRootBase;
|
|
|
| struct PartitionFreelistEntry {
|
| PartitionFreelistEntry* next;
|
| @@ -229,6 +231,7 @@ struct PartitionPage {
|
| int16_t numAllocatedSlots; // Deliberately signed, -1 for free page, -n for full pages.
|
| uint16_t numUnprovisionedSlots;
|
| uint16_t pageOffset;
|
| + uint16_t freeCacheIndex;
|
| };
|
|
|
| struct PartitionBucket {
|
| @@ -259,6 +262,9 @@ struct WTF_EXPORT PartitionRootBase {
|
| char* nextPartitionPageEnd;
|
| PartitionSuperPageExtentEntry* currentExtent;
|
| PartitionSuperPageExtentEntry* firstExtent;
|
| + PartitionPage* globalEmptyPageRing[kMaxFreeableSpans];
|
| + size_t globalEmptyPageHeadIndex;
|
| + size_t numGlobalEmptyPageEntries;
|
| uintptr_t invertedSelf;
|
|
|
| static int gInitializedLock;
|
|
|