F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Os::MemoryInterface Class Referenceabstract

interface for memory implementation More...

#include <Os/Memory.hpp>

Inheritance diagram for Os::MemoryInterface:
Os::Darwin::Memory::DarwinMemory Os::Linux::Memory::LinuxMemory Os::Memory Os::Stub::Memory::StubMemory

Public Types

using Status = Os::Generic::Status
 
using Usage = Os::Generic::UsedTotal
 

Public Member Functions

 MemoryInterface ()=default
 Default constructor. More...
 
virtual ~MemoryInterface ()=default
 Default destructor. More...
 
 MemoryInterface (const MemoryInterface &other)=delete
 copy constructor is forbidden More...
 
virtual MemoryInterfaceoperator= (const MemoryInterface &other)=delete
 assignment operator is forbidden More...
 
virtual Status _getUsage (Usage &memory_usage)=0
 get system memory usage More...
 
virtual MemoryHandlegetHandle ()=0
 return the underlying memory handle (implementation specific). More...
 

Static Public Member Functions

static MemoryInterfacegetDelegate (MemoryHandleStorage &aligned_new_memory)
 provide a pointer to a Mutex delegate object More...
 

Detailed Description

interface for memory implementation

Definition at line 16 of file Memory.hpp.

Member Typedef Documentation

◆ Status

Definition at line 18 of file Memory.hpp.

◆ Usage

Definition at line 19 of file Memory.hpp.

Constructor & Destructor Documentation

◆ MemoryInterface() [1/2]

Os::MemoryInterface::MemoryInterface ( )
default

Default constructor.

◆ ~MemoryInterface()

virtual Os::MemoryInterface::~MemoryInterface ( )
virtualdefault

Default destructor.

◆ MemoryInterface() [2/2]

Os::MemoryInterface::MemoryInterface ( const MemoryInterface other)
delete

copy constructor is forbidden

Member Function Documentation

◆ _getUsage()

virtual Status Os::MemoryInterface::_getUsage ( Usage memory_usage)
pure virtual

get system memory usage

Parameters
memory_usage(output) data structure used to store memory usage
Returns
: ERROR when error occurs, OK otherwise.

Implemented in Os::Stub::Memory::StubMemory, Os::Memory, Os::Linux::Memory::LinuxMemory, and Os::Darwin::Memory::DarwinMemory.

◆ getDelegate()

MemoryInterface * Os::MemoryInterface::getDelegate ( MemoryHandleStorage aligned_new_memory)
static

provide a pointer to a Mutex delegate object

Definition at line 10 of file DefaultMemory.cpp.

◆ getHandle()

virtual MemoryHandle* Os::MemoryInterface::getHandle ( )
pure virtual

return the underlying memory handle (implementation specific).

Returns
internal task handle representation

Implemented in Os::Stub::Memory::StubMemory, Os::Memory, Os::Linux::Memory::LinuxMemory, and Os::Darwin::Memory::DarwinMemory.

◆ operator=()

virtual MemoryInterface& Os::MemoryInterface::operator= ( const MemoryInterface other)
virtualdelete

The documentation for this class was generated from the following files: