Standard allocator based on the RTOS system default memory manager. More...
#include <cmsis-plus/rtos/os.h>
Public Types | |
| using | value_type = T |
| Type of elements to be allocated. | |
Public Member Functions | |
Constructors & Destructor | |
| allocator_stateless_default_resource () noexcept=default | |
| Default constructor. Construct a default resource allocator object instance. | |
| allocator_stateless_default_resource (allocator_stateless_default_resource const &other)=default | |
| Copy constructor. | |
| template<typename U > | |
| allocator_stateless_default_resource (allocator_stateless_default_resource< U > const &other) noexcept | |
| Copy constructor template. | |
| allocator_stateless_default_resource (allocator_stateless_default_resource &&other)=default | |
| Move constructor. | |
| ~allocator_stateless_default_resource ()=default | |
| Destruct the default resource allocator object instance. | |
Operators | |
| allocator_stateless_default_resource & | operator= (allocator_stateless_default_resource const &other)=default |
| Copy assignment operator. | |
| allocator_stateless_default_resource & | operator= (allocator_stateless_default_resource &&other)=default |
| Move assignment operator. | |
Public Member Functions | |
| value_type * | allocate (std::size_t elements) |
Allocate a number of memory blocks of type value_type. | |
| void | deallocate (value_type *addr, std::size_t elements) noexcept |
Deallocate the number of memory blocks of type value_type. | |
| std::size_t | max_size (void) const noexcept |
The maximum number of elements that can be passed to allocate(). | |
| T | Type of elements to be allocated. |
This class template is used as the default allocator for system classes. It gets memory from the system default memory manager os::rtos::memory::get_default_resource().
Definition at line 537 of file os-memory.h.
| using os::rtos::memory::allocator_stateless_default_resource< T >::value_type = T |
Definition at line 543 of file os-memory.h.
|
defaultnoexcept |
|
default |
| other | Reference to existing allocator. |
|
noexcept |
| other | Reference to allocator. |
|
default |
| other | Reference to existing allocator. |
|
default |
| value_type * os::rtos::memory::allocator_stateless_default_resource< T >::allocate | ( | std::size_t | elements | ) |
| elements | Number of elements of type value_type. |
Referenced by os::rtos::internal::object_named_system::operator new().
|
noexcept |
| addr | Pointer to previously allocated memory blocks. |
| elements | Number of elements of type value_type. |
Referenced by os::rtos::memory_pool::~memory_pool(), os::rtos::message_queue::~message_queue(), and os::rtos::internal::object_named_system::operator delete().
|
noexcept |
value_type.
|
default |
| other | Reference to existing allocator. |
|
default |
| other | Reference to existing allocator. |