IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
ice::AllocatorBase< true > Struct Referenceabstract

#include <ice/mem_allocator.hxx>

Inheritance diagram for ice::AllocatorBase< true >:
ice::AllocatorDebugInfo

Public Member Functions

 AllocatorBase (std::source_location const &src_loc) noexcept
 AllocatorBase (std::source_location const &src_loc, std::string_view name) noexcept
 AllocatorBase (std::source_location const &src_loc, AllocatorBase &parent) noexcept
 AllocatorBase (std::source_location const &src_loc, AllocatorBase &parent, std::string_view name) noexcept
auto allocate (ice::AllocRequest request) noexcept -> ice::AllocResult
auto allocate (ice::ChunkedAllocRequest const &request) noexcept -> ice::AllocResult
template<typename T>
requires std::is_trivial_v<T>
auto allocate (ice::u64 count=1) noexcept -> T *
void deallocate (void *pointer) noexcept
void deallocate (ice::Memory memory) noexcept
template<typename T, typename... Args>
auto create (Args &&... args) noexcept -> T *
template<typename T>
requires (std::is_const_v<T> == false)
void destroy (T *object) noexcept
virtual auto allocation_size (void *ptr) const noexcept -> ice::usize
auto debug_info () const noexcept -> ice::AllocatorDebugInfo const &
 \copy AllocatorBase<false>::debug_info()
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
Public Member Functions inherited from ice::AllocatorDebugInfo
 AllocatorDebugInfo (std::source_location src_loc, std::string_view name) noexcept
 AllocatorDebugInfo (std::source_location const &src_loc, std::string_view name, ice::AllocatorDebugInfo &parent) noexcept
virtual ~AllocatorDebugInfo () noexcept
auto location () const noexcept -> std::source_location
auto name () const noexcept -> std::string_view
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
void track_child (ice::AllocatorDebugInfo *child_allocator) noexcept
void remove_child (ice::AllocatorDebugInfo *child_allocator) noexcept
auto parent_allocator () const noexcept -> ice::AllocatorDebugInfo const *
auto child_allocator () const noexcept -> ice::AllocatorDebugInfo const *
auto next_sibling () const noexcept -> ice::AllocatorDebugInfo const *

Static Public Attributes

static constexpr ice::usize SizeNotTracked = AllocatorBase<false>::SizeNotTracked
static constexpr ice::u32 CountNotTracked = AllocatorBase<false>::CountNotTracked
static constexpr bool HasDebugInformation = true

Protected Member Functions

virtual ~AllocatorBase () noexcept
virtual auto do_allocate (ice::AllocRequest request) noexcept -> ice::AllocResult=0
virtual void do_deallocate (void *pointer) noexcept=0
Protected Member Functions inherited from ice::AllocatorDebugInfo
void dbg_count_add () noexcept
void dbg_count_sub () noexcept

Additional Inherited Members

Protected Attributes inherited from ice::AllocatorDebugInfo
std::source_location const _source_location
std::string_view const _name
ice::AllocatorDebugInfo *const _parent
ice::AllocatorDebugInfo_children
ice::AllocatorDebugInfo_next_sibling
ice::AllocatorDebugInfo_prev_sibling
std::atomic< ice::u32_alloc_count
std::atomic< ice::u32_alloc_total_count
Internal * _internal

Constructor & Destructor Documentation

◆ AllocatorBase() [1/4]

ice::AllocatorBase< true >::AllocatorBase ( std::source_location const & src_loc)
noexcept

◆ AllocatorBase() [2/4]

ice::AllocatorBase< true >::AllocatorBase ( std::source_location const & src_loc,
std::string_view name )
noexcept

◆ AllocatorBase() [3/4]

ice::AllocatorBase< true >::AllocatorBase ( std::source_location const & src_loc,
AllocatorBase< true > & parent )
noexcept

◆ AllocatorBase() [4/4]

ice::AllocatorBase< true >::AllocatorBase ( std::source_location const & src_loc,
AllocatorBase< true > & parent,
std::string_view name )
noexcept

◆ ~AllocatorBase()

virtual ice::AllocatorBase< true >::~AllocatorBase ( )
protectedvirtualnoexcept

Member Function Documentation

◆ allocate() [1/3]

auto ice::AllocatorBase< true >::allocate ( ice::AllocRequest request) -> ice::AllocResult
noexcept

◆ allocate() [2/3]

auto ice::AllocatorBase< true >::allocate ( ice::ChunkedAllocRequest const & request) -> ice::AllocResult
noexcept

◆ allocate() [3/3]

template<typename T>
requires std::is_trivial_v<T>
auto ice::AllocatorBase< true >::allocate ( ice::u64 count = 1) -> T *
inlinenoexcept

◆ allocation_count()

auto ice::AllocatorDebugInfo::allocation_count ( ) const -> ice::u32
inlinenoexcept

◆ allocation_size()

virtual auto ice::AllocatorBase< true >::allocation_size ( void * ptr) const -> ice::usize
inlinevirtualnoexcept

◆ allocation_size_inuse()

◆ allocation_size_watermark()

auto ice::AllocatorBase< WithDebugInfo >::allocation_size_watermark ( ) const -> ice::usize
inlinenoexcept

◆ allocation_total_count()

◆ create()

template<typename T, typename... Args>
auto ice::AllocatorBase< true >::create ( Args &&... args) -> T *
inlinenoexcept

◆ deallocate() [1/2]

void ice::AllocatorBase< true >::deallocate ( ice::Memory memory)
inlinenoexcept

◆ deallocate() [2/2]

void ice::AllocatorBase< true >::deallocate ( void * pointer)
noexcept

◆ debug_info()

auto ice::AllocatorBase< true >::debug_info ( ) const -> ice::AllocatorDebugInfo const &
noexcept

◆ destroy()

template<typename T>
requires (std::is_const_v<T> == false)
void ice::AllocatorBase< true >::destroy ( T * object)
inlinenoexcept

◆ do_allocate()

virtual auto ice::AllocatorBase< true >::do_allocate ( ice::AllocRequest request) -> ice::AllocResult
protectedpure virtualnoexcept

◆ do_deallocate()

virtual void ice::AllocatorBase< true >::do_deallocate ( void * pointer)
protectedpure virtualnoexcept

Member Data Documentation

◆ CountNotTracked

ice::u32 ice::AllocatorBase< true >::CountNotTracked = AllocatorBase<false>::CountNotTracked
staticconstexpr

◆ HasDebugInformation

bool ice::AllocatorBase< true >::HasDebugInformation = true
staticconstexpr

◆ SizeNotTracked

ice::usize ice::AllocatorBase< true >::SizeNotTracked = AllocatorBase<false>::SizeNotTracked
staticconstexpr

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