Class MemoryManager
Defined in File memory_manager.hpp
Class Documentation
-
class MemoryManager
Public Types
Public Functions
-
MemoryManager() noexcept = default
-
MemoryManager(const MemoryManager&) = delete
-
MemoryManager(MemoryManager&&) = delete
-
MemoryManager &operator=(const MemoryManager&) = delete
-
MemoryManager &operator=(MemoryManager&&) = delete
-
~MemoryManager() noexcept = default
-
void configureMemoryManager(const MePooConfig &mePooConfig, posix::Allocator &managementAllocator, posix::Allocator &chunkMemoryAllocator) noexcept
-
cxx::expected<SharedChunk, Error> getChunk(const ChunkSettings &chunkSettings) noexcept
Obtains a chunk from the mempools.
- Parameters:
chunkSettings – [in] for the requested chunk
- Returns:
a SharedChunk if successful, otherwise a MemoryManager::Error
-
uint32_t getNumberOfMemPools() const noexcept
-
MemPoolInfo getMemPoolInfo(const uint32_t index) const noexcept
Public Static Functions
-
static uint64_t requiredChunkMemorySize(const MePooConfig &mePooConfig) noexcept
-
static uint64_t requiredManagementMemorySize(const MePooConfig &mePooConfig) noexcept
-
static uint64_t requiredFullMemorySize(const MePooConfig &mePooConfig) noexcept
-
MemoryManager() noexcept = default