Chromium Code Reviews| Index: Source/wtf/PartitionAllocTest.cpp |
| diff --git a/Source/wtf/PartitionAllocTest.cpp b/Source/wtf/PartitionAllocTest.cpp |
| index 9cbdce5652d9ac9c43b7046b41ae7c556f8bf633..7190d90ed220a55282c9bd36c5fd42d69d2361d1 100644 |
| --- a/Source/wtf/PartitionAllocTest.cpp |
| +++ b/Source/wtf/PartitionAllocTest.cpp |
| @@ -692,14 +692,13 @@ TEST(PartitionAllocTest, Realloc) |
| partitionFreeGeneric(genericAllocator.root(), ptr); |
| - // Test that shrinking a direct mapped allocation happens in-place (even |
| - // though the new size is smaller than kGenericMaxBucketed). |
| + // Test that shrinking a direct mapped allocation happens in-place. |
| size = WTF::kGenericMaxBucketed + 16 * WTF::kSystemPageSize; |
| ptr = partitionAllocGeneric(genericAllocator.root(), size); |
| size_t actualSize = partitionAllocGetSize(ptr); |
| - ptr2 = partitionReallocGeneric(genericAllocator.root(), ptr, WTF::kGenericMaxBucketed - 16 * WTF::kSystemPageSize); |
| + ptr2 = partitionReallocGeneric(genericAllocator.root(), ptr, WTF::kGenericMaxBucketed + 8 * WTF::kSystemPageSize); |
| EXPECT_EQ(ptr, ptr2); |
| - EXPECT_EQ(actualSize - 32 * WTF::kSystemPageSize, partitionAllocGetSize(ptr2)); |
| + EXPECT_EQ(actualSize - 8 * WTF::kSystemPageSize, partitionAllocGetSize(ptr2)); |
|
Tom Sepez
2014/04/29 20:27:02
It would be nice to have a test case that shows, s
|
| // Test that a previously in-place shrunk direct mapped allocation can be |
| // expanded up again within its original size. |