Allocator using memory resources. More...
#include <cmsis-plus/rtos/os.h>
Classes | |
struct | rebind |
Define a rebind template. More... | |
Public Types | |
using | locker_type = L |
using | value_type = T |
Public Member Functions | |
Constructors & Destructor | |
allocator_stateless_polymorphic_synchronized () noexcept | |
Default constructor. Construct a default allocator object instance. | |
allocator_stateless_polymorphic_synchronized (allocator_stateless_polymorphic_synchronized const &other)=default | |
Copy constructor. | |
template<typename U > | |
allocator_stateless_polymorphic_synchronized (allocator_stateless_polymorphic_synchronized< U, L, get_resource > const &other) noexcept | |
Copy constructor template. | |
allocator_stateless_polymorphic_synchronized (allocator_stateless_polymorphic_synchronized &&other)=default | |
Move constructor. | |
~allocator_stateless_polymorphic_synchronized ()=default | |
Destruct the default allocator object instance. | |
Operators | |
allocator_stateless_polymorphic_synchronized & | operator= (allocator_stateless_polymorphic_synchronized const &other)=default |
Copy assignment operator. | |
allocator_stateless_polymorphic_synchronized & | operator= (allocator_stateless_polymorphic_synchronized &&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() . | |
Allocator using memory resources.
T | Type of elements to be allocated. |
L | Type of lockable object. |
get_resource | Function to get the default resource. |
Definition at line 681 of file os-memory.h.
using os::rtos::memory::allocator_stateless_polymorphic_synchronized< T, L, get_resource >::locker_type = L |
Definition at line 686 of file os-memory.h.
using os::rtos::memory::allocator_stateless_polymorphic_synchronized< T, L, get_resource >::value_type = T |
Definition at line 685 of file os-memory.h.
|
noexcept |
Default constructor. Construct a default allocator object instance.
|
default |
Copy constructor.
other | Reference to existing allocator. |
|
noexcept |
Copy constructor template.
other | Reference to allocator. |
|
default |
Move constructor.
other | Reference to existing allocator. |
|
default |
Destruct the default allocator object instance.
value_type * os::rtos::memory::allocator_stateless_polymorphic_synchronized< T, L, get_resource >::allocate | ( | std::size_t | elements | ) |
Allocate a number of memory blocks of type value_type
.
elements | Number of elements of type value_type . |
|
noexcept |
Deallocate the number of memory blocks of type value_type
.
addr | Pointer to previously allocated memory blocks. |
elements | Number of elements of type value_type . |
|
noexcept |
The maximum number of elements that can be passed to allocate()
.
value_type
.
|
default |
Move assignment operator.
other | Reference to existing allocator. |
|
default |
Copy assignment operator.
other | Reference to existing allocator. |