Class MemPoolSegmentManagerMemoryBlock
Inheritance Relationships
Base Type
public iox::roudi::MemoryBlock(Class MemoryBlock)
Class Documentation
-
class MemPoolSegmentManagerMemoryBlock : public iox::roudi::MemoryBlock
Public Functions
-
MemPoolSegmentManagerMemoryBlock(const mepoo::SegmentConfig &segmentConfig) noexcept
-
~MemPoolSegmentManagerMemoryBlock() noexcept
-
MemPoolSegmentManagerMemoryBlock(const MemPoolSegmentManagerMemoryBlock&) = delete
-
MemPoolSegmentManagerMemoryBlock(MemPoolSegmentManagerMemoryBlock&&) = delete
-
MemPoolSegmentManagerMemoryBlock &operator=(const MemPoolSegmentManagerMemoryBlock&) = delete
-
MemPoolSegmentManagerMemoryBlock &operator=(MemPoolSegmentManagerMemoryBlock&&) = delete
-
virtual uint64_t size() const noexcept override
This function provides the size of the required memory for the underlying data. It is needed for the MemoryProvider to calculate the total size of memory.
Note
the size of for SegmentManager
- Returns:
the required memory as multiple of the alignment
-
virtual uint64_t alignment() const noexcept override
This function provides the alignment of the memory for the underlying data. This information is needed for the MemoryProvider.
Note
The memory alignment for SegmentManager
- Returns:
the alignment of the underlying data.
-
cxx::optional<mepoo::SegmentManager<>*> segmentManager() const noexcept
This function enables the access to the SegmentManager.
- Returns:
an optional pointer to the underlying type, cxx::nullopt_t if value is not initialized
Protected Functions
-
virtual void onMemoryAvailable(cxx::not_null<void*> memory) noexcept override
This function is called once the memory is available and is therefore the earliest possibility to use the memory.
Note
This will create the SegmentManager at the location
memorypoints to- Parameters:
memory – [in] pointer to a valid memory block, the same one that the memory() member function would return
-
virtual void destroy() noexcept override
The MemoryProvider calls this either when MemoryProvider::destroy is called or in its destructor.
Note
This function can be called multiple times. Make sure that the implementation can handle this.
Note
This will clean up the SegmentManager
-
MemPoolSegmentManagerMemoryBlock(const mepoo::SegmentConfig &segmentConfig) noexcept