diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/Allocator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Support/Allocator.cpp b/lib/Support/Allocator.cpp index 31b45c8..19d69f6 100644 --- a/lib/Support/Allocator.cpp +++ b/lib/Support/Allocator.cpp @@ -142,8 +142,10 @@ void BumpPtrAllocator::PrintStats() const { << " (includes alignment, etc)\n"; } -MallocSlabAllocator BumpPtrAllocator::DefaultSlabAllocator = - MallocSlabAllocator(); +MallocSlabAllocator &BumpPtrAllocator::GetDefaultSlabAllocator() { + static MallocSlabAllocator DefaultSlabAllocator; + return DefaultSlabAllocator; +} SlabAllocator::~SlabAllocator() { } |