LLVM: llvm::AllocatorBase< DerivedT > Class Template Reference (original) (raw)
CRTP base class providing obvious overloads for the core [Allocate()](#a3bfc5b8ce6ce70645e6f4662af9eef50 "Allocate Size bytes of Alignment aligned memory.") methods of LLVM-style allocators. More...
#include "[llvm/Support/AllocatorBase.h](AllocatorBase%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| void * | Allocate (size_t Size, size_t Alignment) |
| Allocate Size bytes of Alignment aligned memory. | |
| void | Deallocate (const void *Ptr, size_t Size, size_t Alignment) |
| 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_t<!std::is_same_v< std::remove_cv_t< T >, void >, void > | Deallocate (T *Ptr, size_t Num=1) |
| Deallocate space for a sequence of objects without constructing them. |
template
class llvm::AllocatorBase< DerivedT >
CRTP base class providing obvious overloads for the core [Allocate()](#a3bfc5b8ce6ce70645e6f4662af9eef50 "Allocate Size bytes of Alignment aligned memory.") 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 41 of file AllocatorBase.h.
◆ Allocate() [1/2]
template
template<typename T>
Allocate space for a sequence of objects without constructing them.
Definition at line 76 of file AllocatorBase.h.
References Allocate(), and T.
◆ Allocate() [2/2]
template
◆ Deallocate() [1/2]
template
◆ Deallocate() [2/2]
template
template<typename T>
| std::enable_if_t<!std::is_same_v< std::remove_cv_t< T >, void >, void > llvm::AllocatorBase< DerivedT >::Deallocate ( T * Ptr, size_t Num = 1 ) | inline |
|---|
The documentation for this class was generated from the following file:
- include/llvm/Support/AllocatorBase.h