diff options
Diffstat (limited to 'contrib/llvm/lib/Support/Allocator.cpp')
-rw-r--r-- | contrib/llvm/lib/Support/Allocator.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/llvm/lib/Support/Allocator.cpp b/contrib/llvm/lib/Support/Allocator.cpp index 3c4191b805a3..6e7a541dd4bd 100644 --- a/contrib/llvm/lib/Support/Allocator.cpp +++ b/contrib/llvm/lib/Support/Allocator.cpp @@ -26,6 +26,10 @@ BumpPtrAllocator::BumpPtrAllocator(size_t size, size_t threshold, : SlabSize(size), SizeThreshold(std::min(size, threshold)), Allocator(allocator), CurSlab(0), BytesAllocated(0) { } +BumpPtrAllocator::BumpPtrAllocator(size_t size, size_t threshold) + : SlabSize(size), SizeThreshold(std::min(size, threshold)), + Allocator(DefaultSlabAllocator), CurSlab(0), BytesAllocated(0) { } + BumpPtrAllocator::~BumpPtrAllocator() { DeallocateSlabs(CurSlab); } @@ -167,9 +171,6 @@ void BumpPtrAllocator::PrintStats() const { << " (includes alignment, etc)\n"; } -MallocSlabAllocator BumpPtrAllocator::DefaultSlabAllocator = - MallocSlabAllocator(); - SlabAllocator::~SlabAllocator() { } MallocSlabAllocator::~MallocSlabAllocator() { } |