diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 13:54:10 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 13:54:10 +0000 |
commit | 63faed5b8e4f2755f127fcb8aa440480c0649327 (patch) | |
tree | 19c69a04768629f2d440944b71cbe90adae0b615 /lib/Support/Allocator.cpp | |
parent | d4c8b5d2e851b0e8a063c6bf8543a4823a26c15a (diff) |
Notes
Diffstat (limited to 'lib/Support/Allocator.cpp')
-rw-r--r-- | lib/Support/Allocator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/Allocator.cpp b/lib/Support/Allocator.cpp index 215b0f249d96f..b8978302e7460 100644 --- a/lib/Support/Allocator.cpp +++ b/lib/Support/Allocator.cpp @@ -22,8 +22,8 @@ namespace llvm { BumpPtrAllocator::BumpPtrAllocator(size_t size, size_t threshold, SlabAllocator &allocator) - : SlabSize(size), SizeThreshold(threshold), Allocator(allocator), - CurSlab(0), BytesAllocated(0) { } + : SlabSize(size), SizeThreshold(std::min(size, threshold)), + Allocator(allocator), CurSlab(0), BytesAllocated(0) { } BumpPtrAllocator::~BumpPtrAllocator() { DeallocateSlabs(CurSlab); |