![]() |
GM6000 Digital Heater Controller Build: 20 (Branch = develop)
SDX-1330
|
This private concrete class implements a Memory Allocator using a pool of fixed size blocks. More...
This private concrete class implements a Memory Allocator using a pool of fixed size blocks.
The implementation relies on a sub-class to allocate the actual memory for the blocks.
#include <Pool_.h>
Classes | |
| class | BlockInfo_ |
| Helper class so I can put my blocks into to my standard containers. More... | |
Public Member Functions | |
| Pool_ (BlockInfo_ infoBlocks[], size_t blockSize, size_t alignedBlockSize, size_t numBlocks, void *arrayOfBlocks, bool fatalErrors) | |
| Constructor. | |
| ~Pool_ () | |
| Destructor. | |
| void * | allocate (size_t numbytes) |
| See Cpl::Memory::Allocator. | |
| void | release (void *ptr) |
| See Cpl::Memory::Allocator. | |
| size_t | wordSize () const noexcept |
| See Cpl::Memory::Allocator. | |
Public Member Functions inherited from Cpl::Memory::Allocator | |
| size_t | allocatedSizeForNBytes (size_t nbytes) const noexcept |
| Convenience method that determines the actual amount of memory that actually allocated for a successful allocate request of N bytes. | |
| virtual | ~Allocator () |
| Provide a virtual destructor. | |
Public Member Functions inherited from Cpl::Container::Item | |
| bool | insert_ (void *newContainerPtr) |
| Helper method to trap when inserting an item in multiple containers. | |
| bool | isInContainer_ (const void *containerPtr) const noexcept |
| Returns 'true' if the instance is in the specified container. | |
Protected Attributes | |
| Cpl::Container::DList< BlockInfo_ > | m_freeList |
| My free list of blocks. | |
| Cpl::Container::DList< BlockInfo_ > | m_allocatedList |
| My list of allocated blocks. | |
| size_t | m_blockSize |
| Block size. | |
| size_t | m_alignedBlockSize |
| Block size. | |
| bool | m_fatalErrors |
| Flag that controls memory errors behavior. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Cpl::Container::Item | |
| static void | remove_ (Item *itemPtr) noexcept |
| Helper method to do the proper 'clean-up' for the multiple-containers-error-trap when removing an item from a container. | |
Public Attributes inherited from Cpl::Container::Item | |
| void * | m_nextPtr_ |
| The link field. | |
| void * | m_inListPtr_ |
| Debug field. | |
Protected Member Functions inherited from Cpl::Container::Item | |
| Item () | |
| Constructor. | |
| Item (const char *) | |
| Constructor used ONLY with the child class MapItem: -->special constructor to allow a Map to be statically allocated. | |
| Cpl::Memory::Pool_::Pool_ | ( | BlockInfo_ | infoBlocks[], |
| size_t | blockSize, | ||
| size_t | alignedBlockSize, | ||
| size_t | numBlocks, | ||
| void * | arrayOfBlocks, | ||
| bool | fatalErrors ) |
Constructor.
| Cpl::Memory::Pool_::~Pool_ | ( | ) |
Destructor.
|
virtual |
Implements Cpl::Memory::Allocator.
|
virtual |
Implements Cpl::Memory::Allocator.
|
virtualnoexcept |
Implements Cpl::Memory::Allocator.
|
protected |
Block size.
|
protected |
My list of allocated blocks.
|
protected |
Block size.
|
protected |
Flag that controls memory errors behavior.
|
protected |
My free list of blocks.