17#ifndef IOX_POSH_ROUDI_MEMORY_ROUDI_MEMORY_MANAGER_HPP
18#define IOX_POSH_ROUDI_MEMORY_ROUDI_MEMORY_MANAGER_HPP
20#include "iceoryx_posh/iceoryx_posh_types.hpp"
21#include "iceoryx_posh/internal/roudi/memory/mempool_collection_memory_block.hpp"
22#include "iceoryx_posh/internal/roudi/memory/mempool_segment_manager_memory_block.hpp"
23#include "iceoryx_posh/internal/roudi/memory/port_pool_memory_block.hpp"
24#include "iceoryx_posh/roudi/memory/posix_shm_memory_provider.hpp"
26#include "iceoryx_hoofs/cxx/expected.hpp"
27#include "iceoryx_hoofs/cxx/optional.hpp"
28#include "iceoryx_hoofs/cxx/vector.hpp"
52class RouDiMemoryManager
55 RouDiMemoryManager()
noexcept =
default;
59 RouDiMemoryManager(RouDiMemoryManager&&) = delete;
60 RouDiMemoryManager& operator=(RouDiMemoryManager&&) = delete;
62 RouDiMemoryManager(const RouDiMemoryManager&) = delete;
63 RouDiMemoryManager& operator=(const RouDiMemoryManager&) = delete;
81 mepoo::MePooConfig introspectionMemPoolConfig() const noexcept;
82 cxx::vector<
MemoryProvider*, MAX_NUMBER_OF_MEMORY_PROVIDER> m_memoryProvider;
This class creates memory which is requested by the MemoryBlocks. Once the memory is available,...
Definition memory_provider.hpp:69
cxx::expected< RouDiMemoryManagerError > addMemoryProvider(MemoryProvider *memoryProvider) noexcept
This function add a MemoryProvider to the memory manager.
cxx::expected< RouDiMemoryManagerError > destroyMemory() noexcept
The RouDiMemoryManager calls the the MemoryProvider to destroy the memory, which in turn prompts the ...
cxx::expected< RouDiMemoryManagerError > createAndAnnounceMemory() noexcept
The RouDiMemoryManager calls the the MemoryProvider to create the memory and announce the availabilit...
virtual ~RouDiMemoryManager() noexcept
The Destructor of the RouDiMemoryManager also calls destroy on the registered MemoryProvider.
Definition iceoryx_posh_types.hpp:217
@ MEMORY_DESTRUCTION_FAILED
generic error if memory destruction failed
Definition memory_provider.hpp:54
@ MEMORY_CREATION_FAILED
generic error if memory creation failed
Definition memory_provider.hpp:44
RouDiMemoryManagerError
Definition roudi_memory_manager.hpp:39
@ NO_MEMORY_PROVIDER_PRESENT
an action was performed which requires memory provider
Definition roudi_memory_manager.hpp:43
@ MEMORY_PROVIDER_EXHAUSTED
attempt to add more memory provider than the capacity allows
Definition roudi_memory_manager.hpp:41