class AllocatorBase
Declaration
template <typename DerivedT>
class AllocatorBase { /* full declaration omitted */ };
Description
CRTP base class providing obvious overloads for the core \c 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.
Declared at: llvm/include/llvm/Support/AllocatorBase.h:34
Templates
- DerivedT
Method Overview
- public void * Allocate(size_t Size, size_t Alignment)
- public template <typename T>T * Allocate(size_t Num = 1)
- public void Deallocate(const void * Ptr, size_t Size, size_t Alignment)
- public template <typename T>std::enable_if_t<!std::is_same<std::remove_cv_t<T>, void>::value, void> Deallocate(T * Ptr, size_t Num = 1)
Methods
¶void* Allocate(size_t Size, size_t Alignment)
void* Allocate(size_t Size, size_t Alignment)
Description
Allocate \a Size bytes of \a Alignment aligned memory. This method must be implemented by \c DerivedT.
Declared at: llvm/include/llvm/Support/AllocatorBase.h:38
Parameters
- size_t Size
- size_t Alignment
¶template <typename T>
T* Allocate(size_t Num = 1)
template <typename T>
T* Allocate(size_t Num = 1)
Description
Allocate space for a sequence of objects without constructing them.
Declared at: llvm/include/llvm/Support/AllocatorBase.h:69
Templates
- T
Parameters
- size_t Num = 1
¶void Deallocate(const void* Ptr,
size_t Size,
size_t Alignment)
void Deallocate(const void* Ptr,
size_t Size,
size_t Alignment)
Description
Deallocate \a Ptr to \a Size bytes of memory allocated by this allocator.
Declared at: llvm/include/llvm/Support/AllocatorBase.h:52
Parameters
- const void* Ptr
- size_t Size
- size_t Alignment
¶template <typename T>
std::enable_if_t<
!std::is_same<std::remove_cv_t<T>,
void>::value,
void>
Deallocate(T* Ptr, size_t Num = 1)
template <typename T>
std::enable_if_t<
!std::is_same<std::remove_cv_t<T>,
void>::value,
void>
Deallocate(T* Ptr, size_t Num = 1)
Description
Deallocate space for a sequence of objects without constructing them.
Declared at: llvm/include/llvm/Support/AllocatorBase.h:76
Templates
- T
Parameters
- T* Ptr
- size_t Num = 1