diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-03-01 22:10:16 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-03-01 22:10:16 +0000 |
commit | 97e910ecff5ed8b653a07fb1d014dab772931c0b (patch) | |
tree | 613e515bf78755771a49ce3602727573bccd7938 /unittests/Support | |
parent | b4d023503b40b45fd11835f1697a17e23f958af3 (diff) | |
download | external_llvm-97e910ecff5ed8b653a07fb1d014dab772931c0b.zip external_llvm-97e910ecff5ed8b653a07fb1d014dab772931c0b.tar.gz external_llvm-97e910ecff5ed8b653a07fb1d014dab772931c0b.tar.bz2 |
BumpPtrAllocator: Make sure threshold cannot be initialized with a value smaller than the slab size.
This replaces r151834 with a simpler fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Support')
-rw-r--r-- | unittests/Support/AllocatorTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unittests/Support/AllocatorTest.cpp b/unittests/Support/AllocatorTest.cpp index bc5bd3d..8b463c1 100644 --- a/unittests/Support/AllocatorTest.cpp +++ b/unittests/Support/AllocatorTest.cpp @@ -98,7 +98,7 @@ TEST(AllocatorTest, TestSmallSlabSize) { BumpPtrAllocator Alloc(128); Alloc.Allocate(200, 0); - EXPECT_EQ(1U, Alloc.GetNumSlabs()); + EXPECT_EQ(2U, Alloc.GetNumSlabs()); } // Mock slab allocator that returns slabs aligned on 4096 bytes. There is no |