Parameterize the BumpPtrAllocator over a slab allocator. It defaults to using
authorReid Kleckner <reid@kleckner.net>
Thu, 23 Jul 2009 00:30:41 +0000 (00:30 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 23 Jul 2009 00:30:41 +0000 (00:30 +0000)
commit95eb3ad353460c6987a9d1e03a3e3e12c75b4059
treef2315ecd285be56068ff0b18a29450239fc5e31b
parent608ad24ac34c596869f4764c7c51a54c5db230f0
Parameterize the BumpPtrAllocator over a slab allocator.  It defaults to using
malloc, so there should be no functional changes to other code.

These changes are necessary since I have plans to use this allocator in the JIT
memory manager, and it needs a special allocator.

I also added some tests which helped me pinpoint some bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76825 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/Allocator.h
lib/Support/Allocator.cpp
unittests/Support/AllocatorTest.cpp [new file with mode: 0644]