| Index: Source/wtf/PartitionAlloc.h
|
| diff --git a/Source/wtf/PartitionAlloc.h b/Source/wtf/PartitionAlloc.h
|
| index e2e68733ed2ff1a35b4217e13f446a5d3c62b97a..d0c22ac9e3995a57704b00c46970a4cca9de7375 100644
|
| --- a/Source/wtf/PartitionAlloc.h
|
| +++ b/Source/wtf/PartitionAlloc.h
|
| @@ -141,10 +141,10 @@ static const size_t kMaxPartitionPagesPerSlotSpan = 4;
|
|
|
| // To avoid fragmentation via never-used freelist entries, we hand out partition
|
| // freelist sections gradually, in units of the dominant system page size.
|
| -// What we're actually doing is avoiding filling the full partition page
|
| -// (typically 16KB) will freelist pointers right away. Writing freelist
|
| -// pointers will fault and dirty a private page, which is very wasteful if we
|
| -// never actually store objects there.
|
| +// What we're actually doing is avoiding filling the full partition page (16 KB)
|
| +// with freelist pointers right away. Writing freelist pointers will fault and
|
| +// dirty a private page, which is very wasteful if we never actually store
|
| +// objects there.
|
| static const size_t kNumSystemPagesPerPartitionPage = kPartitionPageSize / kSystemPageSize;
|
| static const size_t kMaxSystemPagesPerSlotSpan = kNumSystemPagesPerPartitionPage * kMaxPartitionPagesPerSlotSpan;
|
|
|
| @@ -726,7 +726,7 @@ ALWAYS_INLINE void partitionFreeGeneric(PartitionRootGeneric* root, void* ptr)
|
| #endif
|
| }
|
|
|
| -ALWAYS_INLINE size_t partitionDirectMapSize(size_t size)
|
| +ALWAYS_INLINE size_t partitionRoundUpToSystemPage(size_t size)
|
| {
|
| // Caller must check that the size is not above the kGenericMaxDirectMapped
|
| // limit before calling. This also guards against integer overflow in the
|
| @@ -749,7 +749,7 @@ ALWAYS_INLINE size_t partitionAllocActualSize(PartitionRootGeneric* root, size_t
|
| // Too large to allocate => return the size unchanged.
|
| } else {
|
| ASSERT(bucket == &PartitionRootBase::gPagedBucket);
|
| - size = partitionDirectMapSize(size);
|
| + size = partitionRoundUpToSystemPage(size);
|
| }
|
| return partitionCookieSizeAdjustSubtract(size);
|
| #endif
|
|
|