Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::AZStdFunctorAllocator Class Reference

#include <Memory.h>

Public Types

using pointer = void *
 
using size_type = AZStd::size_t
 
using difference_type = AZStd::ptrdiff_t
 
using functor_type = IAllocator &(*)()
 

Public Member Functions

constexpr AZStdFunctorAllocator (functor_type allocatorFunctor)
 
constexpr AZStdFunctorAllocator (const AZStdFunctorAllocator &rhs)=default
 
constexpr AZStdFunctorAllocatoroperator= (const AZStdFunctorAllocator &rhs)=default
 
pointer allocate (size_t byteSize, size_t alignment)
 
pointer reallocate (pointer ptr, size_t newSize, size_t newAlignment=1)
 
void deallocate (pointer ptr, size_t byteSize, size_t alignment)
 
size_type max_size () const
 
size_type get_allocated_size () const
 
constexpr bool operator== (const AZStdFunctorAllocator &rhs) const
 
constexpr bool operator!= (const AZStdFunctorAllocator &rhs) const
 

Detailed Description

Generic wrapper for binding IAllocator interface allocator. This is basically the same as AZStdAlloc but it allows you to remove the template parameter and retrieve the allocator from a supplied function pointer

Member Typedef Documentation

◆ functor_type

Function Pointer must return IAllocator&. function pointers do not support covariant return types


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