µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
os-memory.h File Reference
#include <cmsis-plus/estd/system_error>
#include <limits>
#include <new>
#include <cerrno>
#include <mutex>

Go to the source code of this file.

Classes

class  os::rtos::memory::allocator_deleter< A >
 Allocator deleter. More...
 
class  os::rtos::memory::allocator_stateless_default_resource< T >
 Standard allocator based on the RTOS system default memory manager. More...
 
class  os::rtos::memory::allocator_stateless_polymorphic_synchronized< T, L, get_resource >
 Allocator using memory resources. More...
 
class  os::rtos::memory::memory_resource
 Memory resource manager (abstract class). More...
 
struct  os::rtos::memory::allocator_stateless_polymorphic_synchronized< T, L, get_resource >::rebind< U >
 Define a rebind template. More...
 

Namespaces

namespace  os
 System namespace.
 
namespace  os::estd
 Embedded std namespace.
 
namespace  os::rtos
 RTOS namespace.
 
namespace  os::rtos::memory
 
namespace  os::rtos::scheduler
 Scheduler namespace.
 

Typedefs

template<typename T , typename U = T>
using os::rtos::memory::allocator_typed = allocator_stateless_polymorphic_synchronized< T, scheduler::lockable, get_resource_typed< U > >
 Type of an allocator for objects of type T.
 
using os::rtos::memory::out_of_memory_handler_t = void(*)(void)
 Type of out of memory handler.
 
template<typename T , typename U = T>
using os::rtos::memory::unique_ptr = std::unique_ptr< T, allocator_deleter< allocator_typed< T, U > > >
 Type of a RTOS unique pointer to objects of type T.
 

Functions

void os::estd::__throw_bad_alloc (void)
 
constexpr std::size_t os::rtos::memory::align_size (std::size_t size, std::size_t align) noexcept
 Helper function to align size values.
 
template<typename T , typename A , typename ... Args>
auto os::rtos::memory::allocate_unique (const A &allocator, Args &&... args)
 Function template to allocate a unique pointer.
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< condition_variable > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< event_flags > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< memory_pool > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< message_queue > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< mutex > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< semaphore > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< thread > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< timer > (void) noexcept
 
constexpr std::size_t os::rtos::memory::max (std::size_t a, std::size_t b)
 
template<typename T1 , typename T2 , typename L , F get_resource>
bool os::rtos::memory::operator!= (const allocator_stateless_polymorphic_synchronized< T1, L, get_resource > &lhs, const allocator_stateless_polymorphic_synchronized< T2, L, get_resource > &rhs) noexcept
 
template<typename T1 , typename T2 , typename L , F get_resource>
bool os::rtos::memory::operator== (const allocator_stateless_polymorphic_synchronized< T1, L, get_resource > &lhs, const allocator_stateless_polymorphic_synchronized< T2, L, get_resource > &rhs) noexcept
 
RTOS System Memory Functions
memory_resourceos::rtos::memory::get_default_resource (void) noexcept
 Get the default RTOS system memory manager.
 
void os::rtos::memory::init_once_default_resource (void)
 
memory_resourceos::rtos::memory::malloc_resource (void) noexcept
 Get the address of a memory manager based on POSIX malloc().
 
memory_resourceos::rtos::memory::set_default_resource (memory_resource *res) noexcept
 Set the default RTOS system memory manager.
 
Operators
bool os::rtos::memory::operator!= (const memory_resource &lhs, const memory_resource &rhs) noexcept
 Compare the memory_resource instances for inequality.
 
bool os::rtos::memory::operator== (const memory_resource &lhs, const memory_resource &rhs) noexcept
 Compare the memory_resource instances for equality.
 
Type Specific Resource Managers
template<typename T >
memory_resourceos::rtos::memory::get_resource_typed (void) noexcept
 Function template to get a memory resource.
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< condition_variable > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< event_flags > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< memory_pool > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< message_queue > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< mutex > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< semaphore > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< thread > (void) noexcept
 
template<>
memory_resourceos::rtos::memory::get_resource_typed< timer > (void) noexcept
 
template<typename T >
memory_resourceos::rtos::memory::set_resource_typed (memory_resource *res) noexcept
 Function template to set a memory resource.
 
template<>
memory_resourceos::rtos::memory::set_resource_typed< condition_variable > (memory_resource *res) noexcept
 
template<>
memory_resourceos::rtos::memory::set_resource_typed< event_flags > (memory_resource *res) noexcept
 
template<>
memory_resourceos::rtos::memory::set_resource_typed< memory_pool > (memory_resource *res) noexcept
 
template<>
memory_resourceos::rtos::memory::set_resource_typed< message_queue > (memory_resource *res) noexcept
 
template<>
memory_resourceos::rtos::memory::set_resource_typed< mutex > (memory_resource *res) noexcept
 
template<>
memory_resourceos::rtos::memory::set_resource_typed< semaphore > (memory_resource *res) noexcept
 
template<>
memory_resourceos::rtos::memory::set_resource_typed< thread > (memory_resource *res) noexcept
 
template<>
memory_resourceos::rtos::memory::set_resource_typed< timer > (memory_resource *res) noexcept