memory
composable_allocator_traits< memory_pool_collection< Pool, BucketDist, RawAllocator > > Class Template Reference

Detailed Description

template<class Pool, class BucketDist, class RawAllocator>
class foonathan::memory::composable_allocator_traits< memory_pool_collection< Pool, BucketDist, RawAllocator > >

Specialization of the composable_allocator_traits for memory_pool_collection 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 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 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
 

Member Functions

◆ try_allocate_node()

template<class Pool, class BucketDist, class RawAllocator>
static void * try_allocate_node ( allocator_type & state,
std::size_t size,
std::size_t alignment )
staticnoexcept
Returns:
The result of try_allocate_node() or nullptr if the allocation size was too big.

◆ try_allocate_array()

template<class Pool, class BucketDist, class RawAllocator>
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_array() or nullptr if the allocation size was too big.

◆ try_deallocate_node()

template<class Pool, class BucketDist, class RawAllocator>
static bool try_deallocate_node ( allocator_type & state,
void * node,
std::size_t size,
std::size_t alignment )
staticnoexcept
Effects:
Just forwards to try_deallocate_node().
Returns:
Whether the deallocation was successful.

◆ try_deallocate_array()

template<class Pool, class BucketDist, class RawAllocator>
static bool try_deallocate_array ( allocator_type & state,
void * array,
std::size_t count,
std::size_t size,
std::size_t alignment )
staticnoexcept
Effects:
Forwards to deallocate_array().
Returns:
Whether the deallocation was successful.