Embedded Template Library 1.0
|
The interface for a memory block pool. More...
#include <imemory_block_allocator.h>
Public Member Functions | |
imemory_block_allocator () | |
Default constructor. | |
void * | allocate (size_t required_size, size_t required_alignment) |
bool | release (const void *const p) |
bool | is_owner_of (const void *const p) const |
![]() | |
successor () | |
Default constructor. | |
successor (successor_type &s) | |
Construct from a successor type. | |
void | set_successor (successor_type &s) |
Set the successor. | |
void | append_successor (TSuccessor &s) |
Append a successor. | |
void | clear_successor () |
Clear the successor. | |
void | clear_successor_chain () |
Clear the successor chain. | |
successor_type & | get_successor () const |
bool | has_successor () const |
Does this have a successor? | |
Protected Member Functions | |
virtual void * | allocate_block (size_t required_size, size_t required_alignment)=0 |
virtual bool | release_block (const void *const)=0 |
virtual bool | is_owner_of_block (const void *const) const =0 |
Additional Inherited Members | |
![]() | |
typedef imemory_block_allocator | successor_type |
The interface for a memory block pool.
|
inline |
Try to allocate a memory block of the required size. If this allocator cannot, then pass the request on the the successor, if configured.
...and we have a successor...
Check if the memory block is owned by this allocator. If this allocator does not own it, then pass the request on the the successor, if configured.
...and we have a successor...
Try to release a memory block of the required size. If this allocator cannot, then pass the request on the the successor, if configured.
...and we have a successor...