#include <dynamic_memory.hpp>
Public Member Functions | |
virtual void * | allocate (std::size_t size) |
virtual void | deallocate (const void *ptr) |
virtual uint16_t | getBlockCapacity () const |
LimitedPoolAllocator (IPoolAllocator &allocator, std::size_t max_blocks) | |
![]() | |
virtual | ~IPoolAllocator () |
Private Attributes | |
IPoolAllocator & | allocator_ |
const uint16_t | max_blocks_ |
uint16_t | used_blocks_ |
Limits the maximum number of blocks that can be allocated in a given allocator.
Definition at line 112 of file dynamic_memory.hpp.
|
inline |
Definition at line 119 of file dynamic_memory.hpp.
|
virtual |
Implements uavcan::IPoolAllocator.
Definition at line 12 of file uc_dynamic_memory.cpp.
|
virtual |
Implements uavcan::IPoolAllocator.
Definition at line 25 of file uc_dynamic_memory.cpp.
|
virtual |
Returns the maximum number of blocks this allocator can allocate.
Implements uavcan::IPoolAllocator.
Definition at line 36 of file uc_dynamic_memory.cpp.
|
private |
Definition at line 114 of file dynamic_memory.hpp.
|
private |
Definition at line 115 of file dynamic_memory.hpp.
|
private |
Definition at line 116 of file dynamic_memory.hpp.