| Index: Source/wtf/PartitionAlloc.h
|
| diff --git a/Source/wtf/PartitionAlloc.h b/Source/wtf/PartitionAlloc.h
|
| index 48e71045f9aa2161ecf0f0f88b85746078b09e6c..a8bc399ebb892318ddaa3c01d5f506d4e1342825 100644
|
| --- a/Source/wtf/PartitionAlloc.h
|
| +++ b/Source/wtf/PartitionAlloc.h
|
| @@ -375,6 +375,11 @@ WTF_EXPORT bool partitionAllocGenericShutdown(PartitionRootGeneric*);
|
| enum PartitionPurgeFlags {
|
| // Decommitting the ring list of empty pages is reasonably fast.
|
| PartitionPurgeDecommitEmptyPages = 1 << 0,
|
| + // Discarding unused system pages is slower, because it involves walking all
|
| + // freelists in all active partition pages of all buckets >= system page
|
| + // size. It often frees a similar amount of memory to decommitting the empty
|
| + // pages, though.
|
| + PartitionPurgeDiscardUnusedSystemPages = 1 << 1,
|
| };
|
|
|
| WTF_EXPORT void partitionPurgeMemory(PartitionRoot*, int);
|
| @@ -477,7 +482,7 @@ ALWAYS_INLINE PartitionPage* partitionPointerToPageNoAlignmentCheck(void* ptr)
|
| return page;
|
| }
|
|
|
| -ALWAYS_INLINE void* partitionPageToPointer(PartitionPage* page)
|
| +ALWAYS_INLINE void* partitionPageToPointer(const PartitionPage* page)
|
| {
|
| uintptr_t pointerAsUint = reinterpret_cast<uintptr_t>(page);
|
| uintptr_t superPageOffset = (pointerAsUint & kSuperPageOffsetMask);
|
|
|