Recycle small arrays allocated from a BumpPtrAllocator.
Declared in <llvm/Support/ArrayRecycler.h>
template<
class T,
size_t Align = alignof(T)>
class ArrayRecycler;
Arrays are allocated in a small number of fixed sizes. For each supported array size, the ArrayRecycler keeps a free list of available arrays.
| Name | Description |
|---|---|
Capacity | The size of an allocated array is represented by a Capacity instance. |
| Name | Description |
|---|---|
~ArrayRecycler [destructor] | Destroy the recycler; call clear() first so recycled arrays are returned. |
allocate | Allocate an array of at least the requested capacity. |
clear | clear overloads |
deallocate | Deallocate an array with the specified Capacity. |