17 #ifndef IOX_POSH_MEPOO_SEGMENT_MANAGER_HPP
18 #define IOX_POSH_MEPOO_SEGMENT_MANAGER_HPP
20 #include "iceoryx_posh/iceoryx_posh_config.hpp"
21 #include "iceoryx_posh/iceoryx_posh_types.hpp"
22 #include "iceoryx_posh/internal/mepoo/memory_manager.hpp"
23 #include "iceoryx_posh/internal/mepoo/mepoo_segment.hpp"
24 #include "iceoryx_posh/mepoo/segment_config.hpp"
25 #include "iceoryx_utils/cxx/optional.hpp"
26 #include "iceoryx_utils/cxx/string.hpp"
27 #include "iceoryx_utils/cxx/vector.hpp"
28 #include "iceoryx_utils/internal/posix_wrapper/shared_memory_object/allocator.hpp"
29 #include "iceoryx_utils/posix_wrapper/posix_access_rights.hpp"
35 template <
typename MemoryManager,
typename SegmentManager,
typename PublisherPort>
36 class MemPoolIntrospection;
41 template <
typename SegmentType = MePooSegment<>>
63 : m_sharedMemoryName(sharedMemoryName)
64 , m_startAddress(startAddress)
66 , m_isWritable(isWritable)
67 , m_segmentId(segmentId)
68 , m_memoryInfo(memoryInfo)
73 ShmName_t m_sharedMemoryName{
""};
74 void* m_startAddress{
nullptr};
76 bool m_isWritable{
false};
77 uint64_t m_segmentId{0};
83 cxx::optional<std::reference_wrapper<MemoryManager>> m_memoryManager;
87 using SegmentMappingContainer = cxx::vector<SegmentMapping, MAX_SHM_SEGMENTS>;
89 SegmentMappingContainer getSegmentMappings(
const posix::PosixUser& user) noexcept;
92 static uint64_t requiredManagementMemorySize(
const SegmentConfig& config) noexcept;
93 static uint64_t requiredChunkMemorySize(
const SegmentConfig& config) noexcept;
94 static uint64_t requiredFullMemorySize(
const SegmentConfig& config) noexcept;
100 template <
typename MemoryManger,
typename SegmentManager,
typename PublisherPort>
103 posix::Allocator* m_managementAllocator;
104 cxx::vector<SegmentType, MAX_SHM_SEGMENTS> m_segmentContainer;
105 bool m_createInterfaceEnabled{
true};
112 #include "iceoryx_posh/internal/mepoo/segment_manager.inl"
Definition: segment_manager.hpp:43
This class handles the mempool intropection for RouDi. It is recommended to use the MemPoolIntrospect...
Definition: mempool_introspection.hpp:40
Definition: service_description.hpp:29
Stores properties of the memory to be used when we distinguish between different types of memory on e...
Definition: memory_info.hpp:28
Definition: segment_config.hpp:33
Definition: segment_config.hpp:31
Definition: segment_manager.hpp:55