|
memory
|
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.
Typedefs | |
| using | allocator_type |
| using | storage_policy |
| using | mutex |
| using | is_stateful |
Member Functions | |
| allocator_storage ()=default | |
| template<class Alloc> | |
| allocator_storage (Alloc &&alloc,) | |
| template<class OtherPolicy> | |
| allocator_storage (const allocator_storage< OtherPolicy, Mutex > &other,) | |
| 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 |
| void * | try_allocate_node (std::size_t size, std::size_t alignment) noexcept |
| void * | try_allocate_array (std::size_t count, std::size_t size, std::size_t alignment) noexcept |
| bool | try_deallocate_node (void *ptr, std::size_t size, std::size_t alignment) noexcept |
| 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 -> implementation_defined |
| auto | lock () const noexcept -> implementation_defined |
|
default |
StoragePolicy. StoragePolicy must be default-constructible. | allocator_storage | ( | Alloc && | alloc | ) |
StoragePolicy, it decides whether it will be moved, its address stored or something else. new storage_policy(std::forward<Alloc>(alloc)) must be well-formed, otherwise this constructor does not participate in overload resolution. | allocator_storage | ( | const allocator_storage< OtherPolicy, Mutex > & | other | ) |
allocator_storage with a different StoragePolicy but the same Mutex type. Initializes it with the result of other.get_allocator(). new storage_policy(other.get_allocator()) must be well-formed, otherwise this constructor does not participate in overload resolution.
|
noexcept |
allocator_storage object. A moved-out allocator_storage object must still store a valid allocator object.
|
default |
allocator_storage object. StoragePolicy must be copyable.
|
noexcept |
allocator_storage object. A moved-out allocator_storage object must still store a valid allocator object.
|
default |
allocator_storage object. StoragePolicy must be copyable. | void * allocate_node | ( | std::size_t | size, |
| std::size_t | alignment ) |
Mutex will be locked during the operation. | void * allocate_array | ( | std::size_t | count, |
| std::size_t | size, | ||
| std::size_t | alignment ) |
Mutex will be locked during the operation.
|
noexcept |
Mutex will be locked during the operation.
|
noexcept |
Mutex will be locked during the operation. | std::size_t max_node_size | ( | ) | const |
Mutex will be locked during the operation. | std::size_t max_array_size | ( | ) | const |
Mutex will be locked during the operation. | std::size_t max_alignment | ( | ) | const |
Mutex will be locked during the operation.
|
noexcept |
Mutex will be locked during the operation. true.
|
noexcept |
Mutex will be locked during the operation. true.
|
noexcept |
Mutex will be locked during the operation. true.
|
noexcept |
Mutex will be locked during the operation. true.
|
noexcept |
StoragePolicy. Mutex.
|
noexcept |
StoragePolicy. Mutex.
|
noexcept |
Mutex will be kept locked.
|
noexcept |
Mutex will be kept locked.
|
noexcept |
constexpr.
1.13.2