SPH
Public Member Functions | List of all members
StackAllocator< TSize, TAlign > Class Template Reference

Allocator used pre-allocated fixed-size buffer on stack. More...

#include <Allocators.h>

Inheritance diagram for StackAllocator< TSize, TAlign >:
Immovable Local

Public Member Functions

INLINE MemoryBlock allocate (const std::size_t size, const std::size_t UNUSED(align)) noexcept
 
INLINE void deallocate (MemoryBlock &block) noexcept
 
INLINE bool owns (const MemoryBlock &block) const noexcept
 
- Public Member Functions inherited from Immovable
 Immovable ()=default
 
 Immovable (const Immovable &)=delete
 
 Immovable (Immovable &&)=delete
 
Immovableoperator= (const Immovable &)=delete
 
Immovableoperator= (Immovable &&)=delete
 

Detailed Description

template<std::size_t TSize, Size TAlign = 16>
class StackAllocator< TSize, TAlign >

Allocator used pre-allocated fixed-size buffer on stack.

Function allocate returns an empty block if the allocator does not have enough available memory.

Definition at line 52 of file Allocators.h.

Member Function Documentation

◆ allocate()

template<std::size_t TSize, Size TAlign = 16>
INLINE MemoryBlock StackAllocator< TSize, TAlign >::allocate ( const std::size_t  size,
const std::size_t   UNUSEDalign 
)
inlinenoexcept

Definition at line 60 of file Allocators.h.

◆ deallocate()

template<std::size_t TSize, Size TAlign = 16>
INLINE void StackAllocator< TSize, TAlign >::deallocate ( MemoryBlock block)
inlinenoexcept

Definition at line 73 of file Allocators.h.

◆ owns()

template<std::size_t TSize, Size TAlign = 16>
INLINE bool StackAllocator< TSize, TAlign >::owns ( const MemoryBlock block) const
inlinenoexcept

Definition at line 83 of file Allocators.h.


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