|
FastLED 3.9.15
|
Definition at line 461 of file allocator.h.
#include <allocator.h>
Collaboration diagram for fl::SlabAllocator< T, SLAB_SIZE >:Classes | |
| struct | Slab |
Public Member Functions | |
| SlabAllocator () FL_NOEXCEPT | |
| SlabAllocator (const SlabAllocator &) FL_NOEXCEPT=delete | |
| SlabAllocator (SlabAllocator &&other) FL_NOEXCEPT | |
| ~SlabAllocator () FL_NOEXCEPT | |
| T * | allocate (fl::size n=1) FL_NOEXCEPT |
| void | cleanup () FL_NOEXCEPT |
| void | deallocate (T *ptr, fl::size n=1) FL_NOEXCEPT |
| fl::size | getActiveAllocations () const FL_NOEXCEPT |
| fl::size | getSlabCount () const FL_NOEXCEPT |
| fl::size | getTotalAllocated () const FL_NOEXCEPT |
| fl::size | getTotalDeallocated () const FL_NOEXCEPT |
| SlabAllocator & | operator= (const SlabAllocator &) FL_NOEXCEPT=delete |
| SlabAllocator & | operator= (SlabAllocator &&other) FL_NOEXCEPT |
Private Member Functions | |
| void * | allocateFromSlab (fl::size n=1) FL_NOEXCEPT |
| Slab * | createSlab () FL_NOEXCEPT |
| void | deallocateToSlab (void *ptr, fl::size n=1) FL_NOEXCEPT |
| void * | findContiguousBlocks (Slab *slab, fl::size n) FL_NOEXCEPT |
Private Attributes | |
| Slab * | mSlabs |
| fl::size | mTotalAllocated |
| fl::size | mTotalDeallocated |
Static Private Attributes | |
| static constexpr fl::size | BLOCKS_PER_SLAB = SLAB_SIZE |
| static constexpr fl::size | SLAB_BLOCK_SIZE = sizeof(T) > sizeof(void*) ? sizeof(T) : sizeof(void*) |
| static constexpr fl::size | SLAB_MEMORY_SIZE = SLAB_BLOCK_SIZE * BLOCKS_PER_SLAB |