template<typename T, size_t Capacity>
class fsb::WorkArray< T, Capacity >
Fixed-capacity allocator for temporary work buffers.
Allocations are contiguous ranges within an internal std::array<T, Capacity>. This class performs no dynamic allocation.
|
|
size_t | get_used () const noexcept |
| |
|
size_t | get_remaining () const noexcept |
| |
|
T * | data () noexcept |
| |
|
const T * | data () const noexcept |
| |
|
void | reset () noexcept |
| | Reset allocator state (frees all allocations).
|
| |
|
size_t | get_marker () const noexcept |
| | Get a marker representing the current top of stack.
|
| |
|
WorkArrayStatus | restore (size_t marker) noexcept |
| | Restore the allocator to a previous marker (LIFO bulk free).
|
| |
| WorkArrayStatus | allocate (size_t len, WorkBlock< T > &out) noexcept |
| | Allocate a contiguous work block of len elements.
|
| |
| WorkArrayStatus | deallocate (T *ptr, size_t len) noexcept |
| | Deallocate a work block previously returned by allocate().
|
| |
|
WorkArrayStatus | deallocate (const WorkBlock< T > &block) noexcept |
| | Deallocate a work block.
|
| |