|
memory
|
Typedefs | |
| template<class Tracker , class BlockOrRawAllocator > | |
| using | deeply_tracked_block_allocator = implementation_defined |
| Similar to tracked_block_allocator, but shares the tracker with the higher level allocator. More... | |
Functions | |
| template<typename T , class RawAllocator , typename... Args> | |
| auto | allocate_unique (RawAllocator &&alloc, Args &&... args) -> |
Creates a std::unique_ptr using a RawAllocator for the allocation. More... | |
| template<typename T , class RawAllocator , typename... Args> | |
| auto | allocate_unique (any_allocator, RawAllocator &&alloc, Args &&... args) -> |
Creates a std::unique_ptr using a type-erased RawAllocator for the allocation. More... | |
| template<typename T , class RawAllocator > | |
| auto | allocate_unique (RawAllocator &&alloc, std::size_t size) -> |
Creates a std::unique_ptr owning an array using a RawAllocator for the allocation. More... | |
| template<typename T , class RawAllocator > | |
| auto | allocate_unique (any_allocator, RawAllocator &&alloc, std::size_t size) -> |
Creates a std::unique_ptr owning an array using a type-erased RawAllocator for the allocation. More... | |
| template<typename T , class RawAllocator , typename... Args> | |
| std::shared_ptr< T > | allocate_shared (RawAllocator &&alloc, Args &&... args) |
Creates a std::shared_ptr using a RawAllocator for the allocation. More... | |
| template<typename T , class RawAllocator , class Container = deque<T, RawAllocator>> | |
| std::stack< T, Container > | make_stack (RawAllocator &allocator) |
| template<typename T , class RawAllocator , class Container = deque<T, RawAllocator>> | |
| std::queue< T, Container > | make_queue (RawAllocator &allocator) |
| template<typename T , class RawAllocator , class Container = deque<T, RawAllocator>, class Compare = std::less<T>> | |
| std::priority_queue< T, Container, Compare > | make_priority_queue (RawAllocator &allocator, Compare comp={}) |
| using deeply_tracked_block_allocator = implementation_defined |
Similar to tracked_block_allocator, but shares the tracker with the higher level allocator.
This allows tracking both (de-)allocations and growth with one tracker.
| std::stack<T, Container> foonathan::memory::make_stack | ( | RawAllocator & | allocator | ) |
Convenience function to create a container adapter using a certain RawAllocator.
| auto foonathan::memory::allocate_unique | ( | RawAllocator && | alloc, |
| Args &&... | args | ||
| ) | -> |
Creates a std::unique_ptr using a RawAllocator for the allocation.
std::unique_ptr owning that memory. RawAllocator will be stored inside the deleter, the caller has to ensure that the object lives as long as the smart pointer. | auto foonathan::memory::allocate_unique | ( | any_allocator | , |
| RawAllocator && | alloc, | ||
| Args &&... | args | ||
| ) | -> |
Creates a std::unique_ptr using a type-erased RawAllocator for the allocation.
It is the same as the other overload but stores the reference to the allocator type-erased inside the std::unique_ptr.
std::unique_ptr with a type-erased allocator reference owning that memory. RawAllocator will be stored inside the deleter, the caller has to ensure that the object lives as long as the smart pointer. | auto foonathan::memory::allocate_unique | ( | RawAllocator && | alloc, |
| std::size_t | size | ||
| ) | -> |
Creates a std::unique_ptr owning an array using a RawAllocator for the allocation.
std::unique_ptr owning that array. RawAllocator will be stored inside the deleter, the caller has to ensure that the object lives as long as the smart pointer. | auto foonathan::memory::allocate_unique | ( | any_allocator | , |
| RawAllocator && | alloc, | ||
| std::size_t | size | ||
| ) | -> |
Creates a std::unique_ptr owning an array using a type-erased RawAllocator for the allocation.
It is the same as the other overload but stores the reference to the allocator type-erased inside the std::unique_ptr.
std::unique_ptr with a type-erased allocator reference owning that array. RawAllocator will be stored inside the deleter, the caller has to ensure that the object lives as long as the smart pointer. | std::shared_ptr<T> foonathan::memory::allocate_shared | ( | RawAllocator && | alloc, |
| Args &&... | args | ||
| ) |
Creates a std::shared_ptr using a RawAllocator for the allocation.
It is similar to std::allocate_shared but uses a RawAllocator (and thus also supports any Allocator).
std::allocate_shared. std::shared_ptr created using std::allocate_shared. RawAllocator will be stored inside the shared pointer, the caller has to ensure that the object lives as long as the smart pointer. | std::queue<T, Container> foonathan::memory::make_queue | ( | RawAllocator & | allocator | ) |
Convenience function to create a container adapter using a certain RawAllocator.
| std::priority_queue<T, Container, Compare> foonathan::memory::make_priority_queue | ( | RawAllocator & | allocator, |
| Compare | comp = {} |
||
| ) |
Convenience function to create a container adapter using a certain RawAllocator.
1.9.1