memory
composable_allocator_traits< memory_stack< BlockAllocator > > Class Template Reference

Detailed Description

template<class BlockAllocator>
class foonathan::memory::composable_allocator_traits< memory_stack< BlockAllocator > >

Specialization of the composable_allocator_traits for memory_stack classes.

Typedefs

using allocator_type
 
using allocator_type
 

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 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 *node, std::size_t size, std::size_t alignment) noexcept
 
static bool try_deallocate_array (allocator_type &state, void *array, 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()

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

◆ try_allocate_array()

template<class BlockAllocator>
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 try_allocate().

◆ try_deallocate_node()

template<class BlockAllocator>
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 unwind().

◆ try_deallocate_array()

template<class BlockAllocator>
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 unwind().