Memory pool attributes. More...
#include <cmsis-plus/rtos/os.h>
Public Member Functions | |
Constructors & Destructor | |
constexpr | attributes () |
Construct a memory pool attributes object instance. | |
attributes (const attributes &)=default | |
attributes (attributes &&)=default | |
attributes & | operator= (const attributes &)=default |
attributes & | operator= (attributes &&)=default |
~attributes ()=default | |
Destruct the memory pool attributes object instance. | |
Public Attributes | |
Public Member Variables | |
void * | mp_pool_address = nullptr |
Address of the user defined storage for the memory pool. | |
std::size_t | mp_pool_size_bytes = 0 |
Size of the user defined storage for the memory pool. | |
Public Member Variables | |
rtos::clock * | clock = nullptr |
Attribute with the address of the clock to be used for timeouts. | |
Memory pool attributes.
Allow to assign a name and custom attributes (like a static address) to the memory pool.
To simplify access, the member variables are public and do not require accessors or mutators.
If the attributes are modified after the memory_pool creation, the memory_pool attributes shall not be affected.
Define an array of structures and pass its address and size via the attributes.
Definition at line 100 of file os-mempool.h.
|
constexpr |
Construct a memory pool attributes object instance.
Definition at line 896 of file os-mempool.h.
|
default |
|
default |
|
default |
Destruct the memory pool attributes object instance.
|
default |
|
default |
|
inherited |
Attribute with the address of the clock to be used for timeouts.
It may be one of os::rtos::sysclock
, os::rtos::rtclock
, or any other user object derived from class os::rtos::clock
.
If nullptr
, the default clock is os::rtos::sysclock
.
Definition at line 629 of file os-decls.h.
void * os::rtos::memory_pool::attributes::mp_pool_address = nullptr |
Address of the user defined storage for the memory pool.
Set this variable to a user defined memory area large enough to store the memory pool. Usually this is a statically allocated array of structures.
The default value is nullptr
, which means there is no user defined memory pool.
Definition at line 146 of file os-mempool.h.
memory_pool::size_t os::rtos::memory_pool::attributes::mp_pool_size_bytes = 0 |
Size of the user defined storage for the memory pool.
The memory pool size must match exactly the allocated size. It is used for validation; when the memory pool is initialised, this size must be large enough to accommodate the desired memory pool.
If the mp_pool_address is nullptr
, this variable is not checked, but it is recommended to leave it zero.
Definition at line 151 of file os-mempool.h.