WPILibC++ 2025.3.2
Loading...
Searching...
No Matches
wpi::memory::composable_allocator_traits< memory_pool_collection< Pool, BucketDist, RawAllocator > > Class Template Reference

Specialization of the composable_allocator_traits for memory_pool_collection classes. More...

#include <wpi/memory/memory_pool_collection.hpp>

Public Types

using allocator_type = memory_pool_collection<Pool, BucketDist, RawAllocator>
 

Static Public Member 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
 

Detailed Description

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

Specialization of the composable_allocator_traits for memory_pool_collection classes.

Member Typedef Documentation

◆ allocator_type

template<class Pool , class BucketDist , class RawAllocator >
using wpi::memory::composable_allocator_traits< memory_pool_collection< Pool, BucketDist, RawAllocator > >::allocator_type = memory_pool_collection<Pool, BucketDist, RawAllocator>

Member Function Documentation

◆ try_allocate_array()

template<class Pool , class BucketDist , class RawAllocator >
static void * wpi::memory::composable_allocator_traits< memory_pool_collection< Pool, BucketDist, RawAllocator > >::try_allocate_array ( allocator_type & state,
std::size_t count,
std::size_t size,
std::size_t alignment )
inlinestaticnoexcept
Returns:
The result of memory_pool_collection::try_allocate_array() or nullptr if the allocation size was too big.

◆ try_allocate_node()

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

◆ try_deallocate_array()

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

◆ try_deallocate_node()

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

The documentation for this class was generated from the following file: