Internal memory chunk; like a std::vector, but does not construct. More...
Public Member Functions | |
MemoryChunk_t (Allocator_t &alloc, size_type n) | |
MemoryChunk_t (const MemoryChunk_t &)=delete | |
Can't copy. More... | |
MemoryChunk_t (MemoryChunk_t &&) | |
Move constructor. More... | |
~MemoryChunk_t () | |
MemoryChunk_t & | operator= (const MemoryChunk_t &)=delete |
Can't assign. More... | |
MemoryChunk_t & | operator= (MemoryChunk_t &&) |
Move assignment. More... | |
size_type | size () const |
Returns the number of elements in this pool. More... | |
size_type | available () const |
Returns the number of free elements in this pool. More... | |
size_type | used () const |
Returns the number of used elements in this pool. More... | |
bool | full () const |
Returns whether the chunk is full. More... | |
pointer | get () |
Returns a pointer to a free item, or nullptr if none is available. More... | |
pointer | get (size_t n) |
Returns a pointer to n free items, or nullptr if not available. More... | |
Public Attributes | |
Allocator_t * | allocator |
reference to the allocator to be used More... | |
pointer | begin = nullptr |
start of the pool More... | |
pointer | end = nullptr |
end of the pool More... | |
pointer | free = nullptr |
first unused element of the pool More... | |
Private Member Functions | |
MemoryChunk_t () | |
< Default constructor (does nothing) More... | |
Internal memory chunk; like a std::vector, but does not construct.
Definition at line 324 of file BulkAllocator.h.
|
inline |
Definition at line 333 of file BulkAllocator.h.
|
delete |
Can't copy.
lar::details::bulk_allocator::BulkAllocatorBase< T >::MemoryChunk_t::MemoryChunk_t | ( | MemoryChunk_t && | from | ) |
Move constructor.
Definition at line 393 of file BulkAllocator.h.
|
inline |
Definition at line 342 of file BulkAllocator.h.
|
inlineprivate |
< Default constructor (does nothing)
Definition at line 374 of file BulkAllocator.h.
|
inline |
Returns the number of free elements in this pool.
Definition at line 352 of file BulkAllocator.h.
|
inline |
Returns whether the chunk is full.
Definition at line 358 of file BulkAllocator.h.
|
inline |
Returns a pointer to a free item, or nullptr if none is available.
Definition at line 361 of file BulkAllocator.h.
|
inline |
Returns a pointer to n free items, or nullptr if not available.
Definition at line 364 of file BulkAllocator.h.
|
delete |
Can't assign.
BulkAllocatorBase< T >::MemoryChunk_t & lar::details::bulk_allocator::BulkAllocatorBase< T >::MemoryChunk_t::operator= | ( | MemoryChunk_t && | from | ) |
Move assignment.
Definition at line 402 of file BulkAllocator.h.
|
inline |
Returns the number of elements in this pool.
Definition at line 349 of file BulkAllocator.h.
|
inline |
Returns the number of used elements in this pool.
Definition at line 355 of file BulkAllocator.h.
Allocator_t* lar::details::bulk_allocator::BulkAllocatorBase< T >::MemoryChunk_t::allocator |
reference to the allocator to be used
Definition at line 326 of file BulkAllocator.h.
pointer lar::details::bulk_allocator::BulkAllocatorBase< T >::MemoryChunk_t::begin = nullptr |
start of the pool
Definition at line 328 of file BulkAllocator.h.
pointer lar::details::bulk_allocator::BulkAllocatorBase< T >::MemoryChunk_t::end = nullptr |
end of the pool
Definition at line 329 of file BulkAllocator.h.
pointer lar::details::bulk_allocator::BulkAllocatorBase< T >::MemoryChunk_t::free = nullptr |
first unused element of the pool
Constructor: allocates memory
Definition at line 330 of file BulkAllocator.h.