Documentation of memory
A stateful RawAllocator that uses a fixed sized storage for the allocations.
It works on a static_allocator_storage and uses its memory for all allocations. Deallocations are not supported, memory cannot be marked as freed.
|using||is_stateful = std::true_type|
|static_allocator (static_allocator_storage< Size > &storage) noexcept|
|void *||allocate_node (std::size_t size, std::size_t alignment)|
|void||deallocate_node (void *, std::size_t, std::size_t) noexcept|
|std::size_t||max_node_size () const noexcept|
|std::size_t||max_alignment () const noexcept|
- Creates it by passing it a static_allocator_storage by reference. It will take the address of the storage and use its memory for the allocation.
- The storage object must live as long as the allocator object. It must not be shared between multiple allocators, i.e. the object must not have been passed to a constructor before.
- A RawAllocator deallocation function. It does nothing, deallocation is not supported by this allocator.
- The maximum node size which is the capacity remaining inside the static_allocator_storage.
- The maximum possible value since there is no alignment restriction (except indirectly through the size of the static_allocator_storage).
Generated by 1.8.12