WPILibC++ 2025.3.2
Loading...
Searching...
No Matches
wpi::memory::allocator_traits< iteration_allocator< N, BlockAllocator > > Class Template Reference

Specialization of the allocator_traits for iteration_allocator. More...

#include <wpi/memory/iteration_allocator.hpp>

Public Types

using allocator_type = iteration_allocator<N, BlockAllocator>
 
using is_stateful = std::true_type
 

Static Public Member Functions

static void * allocate_node (allocator_type &state, std::size_t size, std::size_t alignment)
 
static void * allocate_array (allocator_type &state, std::size_t count, std::size_t size, std::size_t alignment)
 
static std::size_t max_alignment (const allocator_type &) noexcept
 
static void deallocate_node (allocator_type &, void *, std::size_t, std::size_t) noexcept
 
static void deallocate_array (allocator_type &, void *, std::size_t, std::size_t, std::size_t) noexcept
 
static std::size_t max_node_size (const allocator_type &state) noexcept
 
static std::size_t max_array_size (const allocator_type &state) noexcept
 

Detailed Description

template<std::size_t N, class BlockAllocator>
class wpi::memory::allocator_traits< iteration_allocator< N, BlockAllocator > >

Specialization of the allocator_traits for iteration_allocator.

Note
It is not allowed to mix calls through the specialization and through the member functions, i.e. memory_stack::allocate() and this allocate_node().

Member Typedef Documentation

◆ allocator_type

template<std::size_t N, class BlockAllocator >
using wpi::memory::allocator_traits< iteration_allocator< N, BlockAllocator > >::allocator_type = iteration_allocator<N, BlockAllocator>

◆ is_stateful

template<std::size_t N, class BlockAllocator >
using wpi::memory::allocator_traits< iteration_allocator< N, BlockAllocator > >::is_stateful = std::true_type

Member Function Documentation

◆ allocate_array()

template<std::size_t N, class BlockAllocator >
static void * wpi::memory::allocator_traits< iteration_allocator< N, BlockAllocator > >::allocate_array ( allocator_type & state,
std::size_t count,
std::size_t size,
std::size_t alignment )
inlinestatic
Returns:
The result of memory_stack::allocate().

◆ allocate_node()

template<std::size_t N, class BlockAllocator >
static void * wpi::memory::allocator_traits< iteration_allocator< N, BlockAllocator > >::allocate_node ( allocator_type & state,
std::size_t size,
std::size_t alignment )
inlinestatic
Returns:
The result of iteration_allocator::allocate().

◆ deallocate_array()

template<std::size_t N, class BlockAllocator >
static void wpi::memory::allocator_traits< iteration_allocator< N, BlockAllocator > >::deallocate_array ( allocator_type & ,
void * ,
std::size_t ,
std::size_t ,
std::size_t  )
inlinestaticnoexcept

◆ deallocate_node()

template<std::size_t N, class BlockAllocator >
static void wpi::memory::allocator_traits< iteration_allocator< N, BlockAllocator > >::deallocate_node ( allocator_type & ,
void * ,
std::size_t ,
std::size_t  )
inlinestaticnoexcept
Effects:
Does nothing. Actual deallocation can only be done via memory_stack::unwind().

◆ max_alignment()

template<std::size_t N, class BlockAllocator >
static std::size_t wpi::memory::allocator_traits< iteration_allocator< N, BlockAllocator > >::max_alignment ( const allocator_type & )
inlinestaticnoexcept
Returns:
The maximum possible value since there is no alignment restriction (except indirectly through memory_stack::next_capacity()).

◆ max_array_size()

template<std::size_t N, class BlockAllocator >
static std::size_t wpi::memory::allocator_traits< iteration_allocator< N, BlockAllocator > >::max_array_size ( const allocator_type & state)
inlinestaticnoexcept

◆ max_node_size()

template<std::size_t N, class BlockAllocator >
static std::size_t wpi::memory::allocator_traits< iteration_allocator< N, BlockAllocator > >::max_node_size ( const allocator_type & state)
inlinestaticnoexcept
Returns:
The maximum size which is iteration_allocator::capacity_left().

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