bit::memory
|
This is a block allocator that distributes blocks of static memory that is local to the specific thread. More...
#include <thread_local_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 | |
thread_local_block_allocator () noexcept=default | |
Default constructs a thread_local_block_allocator. | |
thread_local_block_allocator (thread_local_block_allocator &&other) noexcept=default | |
Move-constructs a thread_local_block_allocator from another one. More... | |
thread_local_block_allocator (const thread_local_block_allocator &other) noexcept=default | |
Copy-constructs a thread_local_block_allocator from another one. More... | |
thread_local_block_allocator & | operator= (thread_local_block_allocator &&other) noexcept=default |
Move-assigns a thread_local_block_allocator from another one. More... | |
thread_local_block_allocator & | operator= (const thread_local_block_allocator &other) noexcept=default |
Move-assigns a thread_local_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 static memory that is local to the specific thread.
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 74 of file thread_local_block_allocator.hpp.
|
defaultnoexcept |
Move-constructs a thread_local_block_allocator from another one.
other | the other allocator to move |
|
defaultnoexcept |
Copy-constructs a thread_local_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 'thread_local_block_allocator'. Use a named_thread_local_block_allocator to override this
|
noexcept |
Queries the next block size expected from this allocator.
|
defaultnoexcept |
Move-assigns a thread_local_block_allocator from another one.
other | the other allocator to move |
(*this)
|
defaultnoexcept |
Move-assigns a thread_local_block_allocator from another one.
other | the other allocator to move |
(*this)