|
|
| aligned_block_allocator ()=default |
| | Constructs a aligned_block_allocator that will distribute blocks of the specified size.
|
| |
| template<std::size_t USize = DefaultBlockSize, std::size_t UAlign = BlockAlign, typename = std::enable_if_t<(USize!=dynamic_block_size) && (UAlign!=dynamic_block_alignment)>> |
| | aligned_block_allocator (GrowthMultiplier growth) |
| | Constructs an aligned_block_allocator with the specified growth policy. More...
|
| |
| template<std::size_t USize = DefaultBlockSize, typename = std::enable_if_t<USize==dynamic_block_size>> |
| | aligned_block_allocator (block_size_t block_size, GrowthMultiplier growth=GrowthMultiplier{}) |
| | Constructs an aligned_block_allocator with the specified growth policy. More...
|
| |
| template<std::size_t UAlign = BlockAlign, typename = std::enable_if_t<UAlign==dynamic_block_alignment>> |
| | aligned_block_allocator (block_alignment_t block_alignment, GrowthMultiplier growth=GrowthMultiplier{}) |
| | Constructs an aligned_block_allocator with the specified growth policy. More...
|
| |
| template<std::size_t USize = DefaultBlockSize, std::size_t UAlign = BlockAlign, typename = std::enable_if_t<(USize==dynamic_block_size) && (UAlign==dynamic_block_alignment)>> |
| | aligned_block_allocator (block_size_t block_size, block_alignment_t block_alignment, GrowthMultiplier growth=GrowthMultiplier{}) |
| | Constructs an aligned_block_allocator with the specified growth policy. More...
|
| |
| | aligned_block_allocator (aligned_block_allocator &&other)=default |
| | Move-constructs an aligned_block_allocator from another allocator. More...
|
| |
| | aligned_block_allocator (const aligned_block_allocator &other)=default |
| | Copy-constructs an aligned_block_allocator from another allocator. More...
|
| |
| aligned_block_allocator & | operator= (aligned_block_allocator &&other)=default |
| | Move-assigns an aligned_block_allocator from another allocator. More...
|
| |
| aligned_block_allocator & | operator= (const aligned_block_allocator &other)=default |
| | Copy-assigns an aligned_block_allocator from another allocator. More...
|
| |
| owner< memory_block > | allocate_block () noexcept |
| | Allocates a memory_block of size block_size with alignment Align. More...
|
| |
| void | deallocate_block (owner< memory_block > block) noexcept |
| | Deallocates a given memory_block. More...
|
| |
| std::size_t | next_block_size () const noexcept |
| | Queries the next block size expected from this allocator. More...
|
| |
| allocator_info | info () const noexcept |
| | Gets the info about this allocator. More...
|
| |
template<std::size_t DefaultBlockSize, std::size_t BlockAlign, typename GrowthMultiplier = no_growth_multiplier>
class bit::memory::aligned_block_allocator< DefaultBlockSize, BlockAlign, GrowthMultiplier >
An allocator that allocates over-aligned memory.
- Note
- This allocator should only be used for over-aligned memory blocks where required. It does not make sense to be used if the required alignment of each block is less than or equal to
alignof(std::max_align_t) – as this fundamental alignment is required of both the 'new_block_allocator' and 'malloc_block_allocator' without requiring any additional overhead
- Template Parameters
-
| Size | The size of the block |
| Align | The alignment of block |
- Satisfies
- BlockAllocator
- Satisfies
- Stateless
Definition at line 81 of file aligned_block_allocator.hpp.
template<std::size_t DefaultBlockSize, std::size_t BlockAlign, typename GrowthMultiplier = no_growth_multiplier>
template<std::size_t USize = DefaultBlockSize, std::size_t UAlign = BlockAlign, typename = std::enable_if_t<(USize!=dynamic_block_size) && (UAlign!=dynamic_block_alignment)>>
Constructs an aligned_block_allocator with the specified growth policy.
- Parameters
-
| growth | the growth multiplier policy |
template<std::size_t DefaultBlockSize, std::size_t BlockAlign, typename GrowthMultiplier = no_growth_multiplier>
template<std::size_t USize = DefaultBlockSize, std::size_t UAlign = BlockAlign, typename = std::enable_if_t<(USize==dynamic_block_size) && (UAlign==dynamic_block_alignment)>>
Constructs an aligned_block_allocator with the specified growth policy.
- Parameters
-
| block_size | the default block size |
| block_alignment | the default block alignment |
| growth | the growth multiplier policy |