Loading...
Searching...
No Matches
etl::imemory_block_allocator Class Referenceabstract

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
Public Member Functions inherited from etl::successor< imemory_block_allocator >
| successor ()
| Default constructor.
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

Public Types inherited from etl::successor< imemory_block_allocator >
typedef imemory_block_allocator | successor_type

## Detailed Description

The interface for a memory block pool.

## Member Function Documentation

## allocate()

void * etl::imemory_block_allocator::allocate | ( | size_t | required_size,
|  | size_t | required_alignment )

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...

## allocate_block()

virtual void * etl::imemory_block_allocator::allocate_block | ( | size_t | required_size,
|  | size_t | required_alignment )

protected pure virtual

Implemented in etl::fixed_sized_memory_block_allocator< VBlock_Size, VAlignment, VSize >.

## is_owner_of()

bool etl::imemory_block_allocator::is_owner_of | ( | const void *const | p | ) | const

inline

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...

## is_owner_of_block()

virtual bool etl::imemory_block_allocator::is_owner_of_block | ( | const void * const |  | ) | const

protected pure virtual

Implemented in etl::fixed_sized_memory_block_allocator< VBlock_Size, VAlignment, VSize >.

## release()

bool etl::imemory_block_allocator::release | ( | const void *const | p | ) |

inline

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...

## release_block()

virtual bool etl::imemory_block_allocator::release_block | ( | const void * const |  | ) |

protected pure virtual

Implemented in etl::fixed_sized_memory_block_allocator< VBlock_Size, VAlignment, VSize >.

The documentation for this class was generated from the following file:

- include/etl/imemory_block_allocator.h