memory
allocator_traits< iteration_allocator< N, BlockAllocator > > Class Template Reference

Detailed Description

template<std::size_t N, class BlockAllocator>
class foonathan::memory::allocator_traits< iteration_allocator< N, BlockAllocator > >

Specialization of the allocator_traits for iteration_allocator.

Note
It is not allowed to mix calls through the specialization and through the member functions, i.e. allocate() and this allocate_node().

Typedefs

using allocator_type
 
using is_stateful
 
using allocator_type
 
using is_stateful
 

Static Functions

static void * allocate_node (allocator_type &state, std::size_t size, std::size_t alignment)
 
static void * allocate_array (allocator_type &state, std::size_t count, std::size_t size, std::size_t alignment)
 
static std::size_t max_alignment (const allocator_type &) noexcept
 
static void * allocate_node (allocator_type &state, std::size_t size, std::size_t alignment)
 
static void * allocate_array (allocator_type &state, std::size_t count, std::size_t size, std::size_t alignment)
 
static void deallocate_node (allocator_type &state, void *node, std::size_t size, std::size_t alignment) noexcept
 
static void deallocate_array (allocator_type &state, void *array, std::size_t count, std::size_t size, std::size_t alignment) noexcept
 
static std::size_t max_node_size (const allocator_type &state)
 
static std::size_t max_array_size (const allocator_type &state)
 
static std::size_t max_alignment (const allocator_type &state)
 
static void deallocate_node (allocator_type &, void *, std::size_t, std::size_t) noexcept
 
static void deallocate_array (allocator_type &, void *, std::size_t, std::size_t, std::size_t) noexcept
 
static std::size_t max_node_size (const allocator_type &state) noexcept
 
static std::size_t max_array_size (const allocator_type &state) noexcept
 

Member Functions

◆ allocate_node()

template<std::size_t N, class BlockAllocator>
static void * allocate_node ( allocator_type & state,
std::size_t size,
std::size_t alignment )
static
Returns:
The result of allocate().

◆ allocate_array()

template<std::size_t N, class BlockAllocator>
static void * allocate_array ( allocator_type & state,
std::size_t count,
std::size_t size,
std::size_t alignment )
static
Returns:
The result of allocate().

◆ deallocate_node()

template<std::size_t N, class BlockAllocator>
static void deallocate_node ( allocator_type & ,
void * ,
std::size_t ,
std::size_t  )
staticnoexcept
Effects:
Does nothing. Actual deallocation can only be done via unwind().

◆ deallocate_array()

template<std::size_t N, class BlockAllocator>
static void deallocate_array ( allocator_type & ,
void * ,
std::size_t ,
std::size_t ,
std::size_t  )
staticnoexcept
Effects:
Does nothing. Actual deallocation can only be done via unwind().

◆ max_node_size()

template<std::size_t N, class BlockAllocator>
static std::size_t max_node_size ( const allocator_type & state)
staticnoexcept
Returns:
The maximum size which is capacity_left().

◆ max_array_size()

template<std::size_t N, class BlockAllocator>
static std::size_t max_array_size ( const allocator_type & state)
staticnoexcept
Returns:
The maximum size which is capacity_left().

◆ max_alignment()

template<std::size_t N, class BlockAllocator>
static std::size_t max_alignment ( const allocator_type & )
staticnoexcept
Returns:
The maximum possible value since there is no alignment restriction (except indirectly through next_capacity()).