Classes | |
| class | pw::allocator::BestFitAllocator< BlockType > |
| class | pw::allocator::BlockAllocator< BlockType_ > |
| class | pw::allocator::BasicBucketAllocator< BlockType > |
| class | pw::allocator::BucketAllocator< BlockType, kMinInnerSize, kNumBuckets > |
| class | pw::allocator::DlAllocator< BlockType > |
| class | pw::allocator::FirstFitAllocator< BlockType > |
| struct | pw::allocator::TlsfDefaults |
| struct | pw::allocator::TlsfIndices |
| Pair used to index a bucket in a two dimensional array. More... | |
| class | pw::allocator::TlsfAllocator< BlockType, kMinSize, kNumShelves > |
| class | pw::allocator::WorstFitAllocator< BlockType > |
Typedefs | |
| template<typename OffsetType > | |
| using | pw::allocator::BestFitBlock = DetailedBlock< OffsetType, GenericFastSortedItem > |
Alias for a default block type that is compatible with FirstFitAllocator. | |
| template<typename OffsetType = uintptr_t> | |
| using | pw::allocator::BucketBlock = DetailedBlock< OffsetType, UnorderedItem > |
| template<typename OffsetType > | |
| using | pw::allocator::DlBlock = DetailedBlock< OffsetType, GenericFastSortedItem > |
Alias for a default block type that is compatible with DlAllocator. | |
| template<typename OffsetType > | |
| using | pw::allocator::FirstFitBlock = DetailedBlock< OffsetType, SequencedItem > |
Alias for a default block type that is compatible with FirstFitAllocator. | |
| template<typename OffsetType > | |
| using | pw::allocator::TlsfBlock = DetailedBlock< OffsetType, GenericFastSortedItem > |
Alias for a default block type that is compatible with TlsfAllocator. | |
| template<typename OffsetType > | |
| using | pw::allocator::WorstFitBlock = DetailedBlock< OffsetType, GenericFastSortedItem > |
Alias for a default block type that is compatible with FirstFitAllocator. | |
Functions | |
| size_t | pw::allocator::BestFitAllocator< BlockType >::DoGetMaxAllocatable () override |
| BlockResult< BlockType > | pw::allocator::BestFitAllocator< BlockType >::ChooseBlock (Layout layout) override |
| void | pw::allocator::BestFitAllocator< BlockType >::ReserveBlock (BlockType &block) override |
| void | pw::allocator::BestFitAllocator< BlockType >::RecycleBlock (BlockType &block) override |
| using pw::allocator::BucketBlock = typedef DetailedBlock<OffsetType, UnorderedItem> |
Alias for a default block type that is compatible with BucketAllocator.
|
overrideprivatevirtual |
Selects a free block to allocate from.
This method represents the allocator-specific strategy of choosing which block should be used to satisfy allocation requests. If the returned result indicates success, block will be replaced by the chosen block.
| block | Used to return the chosen block. |
| layout | Same as Allocator::Allocate. |
Implements pw::allocator::BlockAllocator< BlockType_ >.
|
overrideprivatevirtual |
Returns the largest single allocation that can succeed, given the current state of the allocator.
The largest allocation possible at any given time is the inner size of the largest free block. This method may be expensive to call if the block allocator implementation does not track its largest block. As a result, it should primarily be used for diagnostic purposes after an allocation failure, e.g.
Note that this method does not consider alignment. An allocation with a large alignment requirement may fail even when a large enough block is available if that block cannot satisfy the alignment requirement.
Implements pw::allocator::BlockAllocator< BlockType_ >.
|
overrideprivatevirtual |
Indicates that a block is now free.
Does nothing by default. Derived class may overload to do additional bookkeeeping.
| block | The block being freed. |
Reimplemented from pw::allocator::BlockAllocator< BlockType_ >.
|
overrideprivatevirtual |
Indicates that a block will no longer be free.
Does nothing by default. Derived class may overload to do additional bookkeeeping.
| block | The block being freed. |
Reimplemented from pw::allocator::BlockAllocator< BlockType_ >.