IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
ice::StackAllocator< Capacity > Struct Template Reference

#include <ice/mem_allocator_stack.hxx>

Inheritance diagram for ice::StackAllocator< Capacity >:
ice::AllocatorBase< ice::build::is_debug||ice::build::is_develop >

Public Member Functions

 StackAllocator (std::source_location=std::source_location::current()) noexcept
 StackAllocator (ice::Allocator &backing_allocator, std::source_location=std::source_location::current()) noexcept
 StackAllocator (ice::Allocator &backing_allocator, std::string_view name, std::source_location=std::source_location::current()) noexcept
void reset () noexcept
Public Member Functions inherited from ice::AllocatorBase< ice::build::is_debug||ice::build::is_develop >
 AllocatorBase (std::source_location const &) noexcept
 AllocatorBase (std::source_location const &, std::string_view) noexcept
 AllocatorBase (std::source_location const &, AllocatorBase &) noexcept
 AllocatorBase (std::source_location const &, AllocatorBase &, std::string_view) noexcept
auto allocate (ice::AllocRequest request) noexcept -> ice::AllocResult
auto allocate (ice::ChunkedAllocRequest const &request) noexcept -> ice::AllocResult
auto allocate (ice::u64 count=1) noexcept -> T *
void deallocate (void *pointer) noexcept
void deallocate (ice::Memory result) noexcept
auto create (Args &&... args) noexcept -> T *
void destroy (T *object) noexcept
auto allocation_count () const noexcept -> ice::u32
auto allocation_total_count () const noexcept -> ice::u32
auto allocation_size_inuse () const noexcept -> ice::usize
auto allocation_size_watermark () const noexcept -> ice::usize
virtual auto allocation_size (void *ptr) const noexcept -> ice::usize
auto debug_info () const noexcept -> ice::AllocatorDebugInfo const &
 Gives access to debug information for an allocator.

Static Public Attributes

static constexpr ice::usize Constant_InternalCapacity = Capacity
Static Public Attributes inherited from ice::AllocatorBase< ice::build::is_debug||ice::build::is_develop >
static constexpr ice::usize SizeNotTracked
static constexpr ice::u32 CountNotTracked
static constexpr bool HasDebugInformation

Protected Member Functions

auto do_allocate (ice::AllocRequest request) noexcept -> ice::AllocResult override
void do_deallocate (void *memory) noexcept override
Protected Member Functions inherited from ice::AllocatorBase< ice::build::is_debug||ice::build::is_develop >
virtual ~AllocatorBase () noexcept=default

Constructor & Destructor Documentation

◆ StackAllocator() [1/3]

template<ice::usize Capacity>
ice::StackAllocator< Capacity >::StackAllocator ( std::source_location src_loc = std::source_location::current())
inlinenoexcept

◆ StackAllocator() [2/3]

template<ice::usize Capacity>
ice::StackAllocator< Capacity >::StackAllocator ( ice::Allocator & backing_allocator,
std::source_location src_loc = std::source_location::current() )
inlinenoexcept

◆ StackAllocator() [3/3]

template<ice::usize Capacity>
ice::StackAllocator< Capacity >::StackAllocator ( ice::Allocator & backing_allocator,
std::string_view name,
std::source_location src_loc = std::source_location::current() )
inlinenoexcept

Member Function Documentation

◆ do_allocate()

template<ice::usize Capacity>
auto ice::StackAllocator< Capacity >::do_allocate ( ice::AllocRequest request) -> ice::AllocResult
inlineoverrideprotectedvirtualnoexcept

◆ do_deallocate()

template<ice::usize Capacity>
void ice::StackAllocator< Capacity >::do_deallocate ( void * memory)
inlineoverrideprotectedvirtualnoexcept

◆ reset()

template<ice::usize Capacity>
void ice::StackAllocator< Capacity >::reset ( )
inlinenoexcept

Member Data Documentation

◆ Constant_InternalCapacity

template<ice::usize Capacity>
ice::usize ice::StackAllocator< Capacity >::Constant_InternalCapacity = Capacity
staticconstexpr

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