Refureku v2.2.0
C++17 runtime reflection library.
rfk::Allocator< T > Class Template Reference

Public Types

using value_type = T
 
using pointer = T *
 
using const_pointer = T const *
 
using reference = T &
 
using const_reference = T const &
 

Public Member Functions

RFK_NODISCARD constexpr T * allocate (std::size_t count)
 Allocate count * sizeof(T) bytes. More...
 
constexpr void deallocate (T *allocatedMemory, std::size_t count)
 Deallocate count * sizeof(T) bytes at the specified memory. More...
 

Member Function Documentation

◆ allocate()

template<typename T >
RFK_NODISCARD constexpr T * rfk::Allocator< T >::allocate ( std::size_t  count)
constexpr

Allocate count * sizeof(T) bytes.

Parameters
countNumber of elements T needed to fit in the allocated memory.
Returns
A pointer to the allocated memory.

◆ deallocate()

template<typename T >
constexpr void rfk::Allocator< T >::deallocate ( T *  allocatedMemory,
std::size_t  count 
)
constexpr

Deallocate count * sizeof(T) bytes at the specified memory.

Parameters
allocatedMemoryPointer to the allocated memory to deallocate.
countNumber of T elements to deallocate.

The documentation for this class was generated from the following file: