LLVM API Documentation
CRTP base class providing obvious overloads for the core Allocate() methods of LLVM-style allocators.
More...
#include <Allocator.h>

Public Member Functions | |
| void * | Allocate (size_t Size, size_t Alignment) |
Allocate Size bytes of Alignment aligned memory. This method must be implemented by DerivedT. | |
| void | Deallocate (const void *Ptr, size_t Size) |
| Deallocate Ptr to Size bytes of memory allocated by this allocator. | |
| template<typename T > | |
| T * | Allocate (size_t Num=1) |
| Allocate space for a sequence of objects without constructing them. | |
| template<typename T > | |
| std::enable_if< !std::is_same < typename std::remove_cv< T > ::type, void >::value, void > ::type | Deallocate (T *Ptr, size_t Num=1) |
| Deallocate space for a sequence of objects without constructing them. | |
CRTP base class providing obvious overloads for the core Allocate() methods of LLVM-style allocators.
This base class both documents the full public interface exposed by all LLVM-style allocators, and redirects all of the overloads to a single core set of methods which the derived class must define.
Definition at line 42 of file Allocator.h.
| void* llvm::AllocatorBase< DerivedT >::Allocate | ( | size_t | Size, |
| size_t | Alignment | ||
| ) | [inline] |
Allocate Size bytes of Alignment aligned memory. This method must be implemented by DerivedT.
Reimplemented in llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold >, and llvm::MallocAllocator.
Definition at line 46 of file Allocator.h.
Referenced by llvm::AllocatorBase< MallocAllocator >::Allocate().
| T* llvm::AllocatorBase< DerivedT >::Allocate | ( | size_t | Num = 1 | ) | [inline] |
Allocate space for a sequence of objects without constructing them.
Definition at line 76 of file Allocator.h.
| void llvm::AllocatorBase< DerivedT >::Deallocate | ( | const void * | Ptr, |
| size_t | Size | ||
| ) | [inline] |
Deallocate Ptr to Size bytes of memory allocated by this allocator.
Reimplemented in llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold >, and llvm::MallocAllocator.
Definition at line 60 of file Allocator.h.
Referenced by llvm::AllocatorBase< MallocAllocator >::Deallocate().
| std::enable_if< !std::is_same<typename std::remove_cv<T>::type, void>::value, void>::type llvm::AllocatorBase< DerivedT >::Deallocate | ( | T * | Ptr, |
| size_t | Num = 1 |
||
| ) | [inline] |
Deallocate space for a sequence of objects without constructing them.
Definition at line 84 of file Allocator.h.