WPILibC++ 2025.1.1
Loading...
Searching...
No Matches
allocator_storage.hpp File Reference

Class template wpi::memory::allocator_storage, some policies and resulting typedefs. More...

#include <new>
#include <type_traits>
#include "detail/utility.hpp"
#include "config.hpp"
#include "allocator_traits.hpp"
#include "threading.hpp"

Go to the source code of this file.

Classes

class  wpi::memory::allocator_storage< StoragePolicy, Mutex >
 A RawAllocator that stores another allocator. More...
 
struct  wpi::memory::any_allocator
 Tag type that enables type-erasure in reference_storage. More...
 
class  wpi::memory::direct_storage< RawAllocator >
 A StoragePolicy that stores the allocator directly. More...
 
class  wpi::memory::allocator_adapter< RawAllocator >
 An alias template for allocator_storage using the direct_storage policy without a mutex. More...
 
class  wpi::memory::thread_safe_allocator< RawAllocator, Mutex >
 An alias template for allocator_storage using the direct_storage policy with a mutex. More...
 
struct  wpi::memory::detail::reference_stateful
 
struct  wpi::memory::detail::reference_stateless
 
struct  wpi::memory::detail::reference_shared
 
class  wpi::memory::detail::reference_storage_impl< RawAllocator, reference_stateful >
 
class  wpi::memory::detail::reference_storage_impl< RawAllocator, reference_stateless >
 
class  wpi::memory::detail::reference_storage_impl< RawAllocator, reference_shared >
 
struct  wpi::memory::is_shared_allocator< RawAllocator >
 Specifies whether or not a RawAllocator has shared semantics. More...
 
class  wpi::memory::reference_storage< RawAllocator >
 A StoragePolicy that stores a reference to an allocator. More...
 
class  wpi::memory::reference_storage< any_allocator >
 Specialization of the class template reference_storage that is type-erased. More...
 
class  wpi::memory::allocator_reference< RawAllocator >
 An alias template for allocator_storage using the reference_storage policy. More...
 

Namespaces

namespace  wpi
 Foonathan namespace.
 
namespace  wpi::memory
 Memory namespace.
 
namespace  wpi::memory::detail
 

Typedefs

using wpi::memory::any_reference_storage = reference_storage<any_allocator>
 An alias for the reference_storage specialization using type-erasure.
 
using wpi::memory::any_allocator_reference = allocator_storage<any_reference_storage, no_mutex>
 An alias for allocator_storage using the any_reference_storage.
 

Functions

template<class Alloc >
void * wpi::memory::detail::try_allocate_node (std::true_type, Alloc &alloc, std::size_t size, std::size_t alignment) noexcept
 
template<class Alloc >
void * wpi::memory::detail::try_allocate_array (std::true_type, Alloc &alloc, std::size_t count, std::size_t size, std::size_t alignment) noexcept
 
template<class Alloc >
bool wpi::memory::detail::try_deallocate_node (std::true_type, Alloc &alloc, void *ptr, std::size_t size, std::size_t alignment) noexcept
 
template<class Alloc >
bool wpi::memory::detail::try_deallocate_array (std::true_type, Alloc &alloc, void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept
 
template<class Alloc >
void * wpi::memory::detail::try_allocate_node (std::false_type, Alloc &, std::size_t, std::size_t) noexcept
 
template<class Alloc >
void * wpi::memory::detail::try_allocate_array (std::false_type, Alloc &, std::size_t, std::size_t, std::size_t) noexcept
 
template<class Alloc >
bool wpi::memory::detail::try_deallocate_node (std::false_type, Alloc &, void *, std::size_t, std::size_t) noexcept
 
template<class Alloc >
bool wpi::memory::detail::try_deallocate_array (std::false_type, Alloc &, void *, std::size_t, std::size_t, std::size_t) noexcept
 
reference_stateful wpi::memory::detail::reference_type (std::true_type stateful, std::false_type shared)
 
reference_stateless wpi::memory::detail::reference_type (std::false_type stateful, std::true_type shared)
 
reference_stateless wpi::memory::detail::reference_type (std::false_type stateful, std::false_type shared)
 
reference_shared wpi::memory::detail::reference_type (std::true_type stateful, std::true_type shared)
 

Detailed Description

Class template wpi::memory::allocator_storage, some policies and resulting typedefs.