Class RouDiMemoryManager
Defined in File roudi_memory_manager.hpp
Class Documentation
-
class RouDiMemoryManager
Public Functions
-
RouDiMemoryManager() noexcept = default
-
virtual ~RouDiMemoryManager() noexcept
The Destructor of the RouDiMemoryManager also calls destroy on the registered MemoryProvider.
-
RouDiMemoryManager(RouDiMemoryManager&&) = delete
-
RouDiMemoryManager &operator=(RouDiMemoryManager&&) = delete
-
RouDiMemoryManager(const RouDiMemoryManager&) = delete
-
RouDiMemoryManager &operator=(const RouDiMemoryManager&) = delete
-
cxx::expected<RouDiMemoryManagerError> addMemoryProvider(MemoryProvider *memoryProvider) noexcept
This function add a MemoryProvider to the memory manager.
- Parameters:
memoryProvider – [in] is a pointer to a user defined MemoryProvider
- Returns:
an RouDiMemoryManagerError::MEMORY_PROVIDER_EXHAUSTED error if no further memory provider can be added, otherwise success
-
cxx::expected<RouDiMemoryManagerError> createAndAnnounceMemory() noexcept
The RouDiMemoryManager calls the the MemoryProvider to create the memory and announce the availability to its MemoryBlocks.
- Returns:
an RouDiMemoryManagerError if the MemoryProvider cannot create the memory, otherwise success
-
cxx::expected<RouDiMemoryManagerError> destroyMemory() noexcept
The RouDiMemoryManager calls the the MemoryProvider to destroy the memory, which in turn prompts the MemoryBlocks to destroy their data.
-
RouDiMemoryManager() noexcept = default