memory
Typedefs | Static Functions
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 = memory_stack< 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().