template<class StoragePolicy, class Mutex>
class foonathan::memory::allocator_storage< StoragePolicy, Mutex >
A RawAllocator that stores another allocator.
The StoragePolicy defines the allocator type being stored and how it is stored. The Mutex
controls synchronization of the access.
|
| allocator_storage ()=default |
|
template<class Alloc , FOONATHAN_REQUIRES((!std::is_base_of< allocator_storage, typename std::decay< Alloc >::type >::value)) > |
| allocator_storage (Alloc &&alloc, FOONATHAN_SFINAE(new storage_policy(detail::forward< Alloc >(alloc)))) |
|
template<class OtherPolicy > |
| allocator_storage (const allocator_storage< OtherPolicy, Mutex > &other, FOONATHAN_SFINAE(new storage_policy(other.get_allocator()))) |
|
bool | is_composable () const noexcept |
|
|
| allocator_storage (allocator_storage &&other) noexcept |
|
allocator_storage & | operator= (allocator_storage &&other) noexcept |
|
|
| allocator_storage (const allocator_storage &)=default |
|
allocator_storage & | operator= (const allocator_storage &)=default |
|
|
void * | allocate_node (std::size_t size, std::size_t alignment) |
|
void * | allocate_array (std::size_t count, std::size_t size, std::size_t alignment) |
|
void | deallocate_node (void *ptr, std::size_t size, std::size_t alignment) noexcept |
|
void | deallocate_array (void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept |
|
std::size_t | max_node_size () const |
|
std::size_t | max_array_size () const |
|
std::size_t | max_alignment () const |
|
|
template<typename Dummy = std::true_type, FOONATHAN_REQUIRES(Dummy::value &&(composable::value)) > |
void * | try_allocate_node (std::size_t size, std::size_t alignment) noexcept |
|
template<typename Dummy = std::true_type, FOONATHAN_REQUIRES(Dummy::value &&(composable::value)) > |
void * | try_allocate_array (std::size_t count, std::size_t size, std::size_t alignment) noexcept |
|
template<typename Dummy = std::true_type, FOONATHAN_REQUIRES(Dummy::value &&(composable::value)) > |
bool | try_deallocate_node (void *ptr, std::size_t size, std::size_t alignment) noexcept |
|
template<typename Dummy = std::true_type, FOONATHAN_REQUIRES(Dummy::value &&(composable::value)) > |
bool | try_deallocate_array (void *ptr, std::size_t count, std::size_t size, std::size_t alignment) noexcept |
|
|
auto | get_allocator () noexcept -> decltype(std::declval< storage_policy >().get_allocator()) |
|
auto | get_allocator () const noexcept -> decltype(std::declval< const storage_policy >().get_allocator()) |
|
|
auto | lock () noexcept -> FOONATHAN_IMPL_DEFINED(decltype(detail::lock_allocator(std::declval< storage_policy >().get_allocator(), std::declval< actual_mutex & >()))) |
|
auto | lock () const noexcept -> FOONATHAN_IMPL_DEFINED(decltype(detail::lock_allocator(std::declval< const storage_policy >().get_allocator(), std::declval< actual_mutex & >()))) |
|