memory
Typedefs | Static Functions
composable_allocator_traits< iteration_allocator< N, BlockAllocator > > Class Template Reference

Detailed Description

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

Specialization of the composable_allocator_traits for iteration_allocator classes.

Typedefs

using allocator_type = iteration_allocator< N, BlockAllocator >
 

Static Functions

static void * try_allocate_node (allocator_type &state, std::size_t size, std::size_t alignment) noexcept
 
static void * try_allocate_array (allocator_type &state, std::size_t count, std::size_t size, std::size_t alignment) noexcept
 
static bool try_deallocate_node (allocator_type &state, void *ptr, std::size_t, std::size_t) noexcept
 
static bool try_deallocate_array (allocator_type &state, void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept
 

Member Functions

◆ try_allocate_node()

static void* try_allocate_node ( allocator_type state,
std::size_t  size,
std::size_t  alignment 
)
staticnoexcept
Returns:
The result of memory_stack::try_allocate().

◆ try_allocate_array()

static void* try_allocate_array ( allocator_type state,
std::size_t  count,
std::size_t  size,
std::size_t  alignment 
)
staticnoexcept
Returns:
The result of memory_stack::try_allocate().

◆ try_deallocate_node()

static bool try_deallocate_node ( allocator_type state,
void *  ptr,
std::size_t  ,
std::size_t   
)
staticnoexcept
Effects:
Does nothing.
Returns:
Whether the memory will be deallocated by memory_stack::unwind().

◆ try_deallocate_array()

static bool try_deallocate_array ( allocator_type state,
void *  ptr,
std::size_t  count,
std::size_t  size,
std::size_t  alignment 
)
staticnoexcept
Effects:
Does nothing.
Returns:
Whether the memory will be deallocated by memory_stack::unwind().