|
fiber
|
A linear allocator that uses stack memory and follows std::pmr::memory_resource
More...
#include <StaticLinearAllocator.hpp>
Classes | |
| struct | Header |
Public Types | |
| using | word = uint32_t |
Public Member Functions | |
| StaticLinearAllocator () | |
| Header * | header (size_t index) |
| template<class Stream> | |
| void | dump (Stream &stream) |
| bool | empty () |
| void | combine_free (std::size_t index) |
| void * | do_allocate (const std::size_t size, const std::size_t alignment) final |
| void | do_deallocate (void *ptr, std::size_t bytes, std::size_t alignment) final |
| bool | do_is_equal (const std::pmr::memory_resource &other) const noexcept final |
Public Attributes | |
| word | buffer [bufferSize] |
Static Public Attributes | |
| static constexpr size_t | bufferSize = Bytes / sizeof(word) |
A linear allocator that uses stack memory and follows std::pmr::memory_resource
| Bytes | The number of bytes (rounded up to multiple of 4) |
| using fiber::StaticLinearAllocator< Bytes >::word = uint32_t |
|
inline |
|
inline |
|
inlinefinal |
|
inlinefinal |
|
inlinefinalnoexcept |
|
inline |
|
inline |
|
inline |
| word fiber::StaticLinearAllocator< Bytes >::buffer[bufferSize] |
|
staticconstexpr |