IndexSupportasmjit::ArenaPool< T, Size >

asmjit::ArenaPool< T, Size > Class Template Reference [¶]

template<typename T, size_t Size = sizeof(T)>
class asmjit::ArenaPool< T, Size >

Helper class for implementing pooling of arena-allocated objects.

Public Members

Classes

Member Functions

template<typename T, size_t Size = sizeof(T)>
void ArenaPool<T, Size>::reset()noexcept[¶]

Resets the arena pool.

Reset must be called before the associated Arena is reset or destroyed to invalidate all pooled chunks.

template<typename T, size_t Size = sizeof(T)>
T* ArenaPool<T, Size>::alloc(
Arena& arena
)nodiscardnoexcept[¶]

Allocates a memory (or reuses the existing allocation) of Size (in bytes).

template<typename T, size_t Size = sizeof(T)>
void ArenaPool<T, Size>::release(
T* ptr
)noexcept[¶]

Pools the previously allocated memory.