bit::memory
|
This is a block allocator that distributes blocks of memory stored statically. More...
#include <static_block_allocator.hpp>
Public Types | |
using | block_size = std::integral_constant< std::size_t, BlockSize > |
using | block_alignment = std::integral_constant< std::size_t, Align > |
Public Member Functions | |
static_block_allocator () noexcept=default | |
Default constructs a static_block_allocator. | |
static_block_allocator (static_block_allocator &&other) noexcept=default | |
Move-constructs a static_block_allocator from another one. More... | |
static_block_allocator (const static_block_allocator &other) noexcept=default | |
Copy-constructs a static_block_allocator from another one. More... | |
static_block_allocator & | operator= (static_block_allocator &&other) noexcept=default |
Move-assigns a static_block_allocator from another one. More... | |
static_block_allocator & | operator= (const static_block_allocator &other) noexcept=default |
Move-assigns a static_block_allocator from another one. More... | |
owner< memory_block > | allocate_block () noexcept |
Allocates a memory block of size Size . 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... | |
This is a block allocator that distributes blocks of memory stored statically.
This type is templated on both the size of the static block, and an additional Tag type that may be used to create individual instantiations
BlockSize | the size of the static allocation |
Blocks | the number of blocks |
Align | the alignment of the blocks |
Tag | the type used for a tag |
Definition at line 73 of file static_block_allocator.hpp.
|
defaultnoexcept |
Move-constructs a static_block_allocator from another one.
other | the other allocator to move |
|
defaultnoexcept |
Copy-constructs a static_block_allocator from another one.
other | the other allocator to copy |
|
noexcept |
Allocates a memory block of size Size
.
|
noexcept |
Deallocates a given memory_block.
block | the block to deallocate |
|
noexcept |
Gets the info about this allocator.
This defaults to 'static_block_allocator'. Use a named_static_block_allocator to override this
|
noexcept |
Queries the next block size expected from this allocator.
|
defaultnoexcept |
Move-assigns a static_block_allocator from another one.
other | the other allocator to move |
(*this)
|
defaultnoexcept |
Move-assigns a static_block_allocator from another one.
other | the other allocator to move |
(*this)