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

#include <Fw/Types/MmapAllocator.hpp>

Inheritance diagram for Fw::MmapAllocator:
Fw::MemAllocator

Public Member Functions

 MmapAllocator ()
 
virtual ~MmapAllocator ()
 Destructor with no arguments. More...
 
void * allocate (const NATIVE_UINT_TYPE identifier, NATIVE_UINT_TYPE &size, bool &recoverable)
 
void deallocate (const NATIVE_UINT_TYPE identifier, void *ptr)
 

Additional Inherited Members

- Protected Member Functions inherited from Fw::MemAllocator
 MemAllocator ()
 
virtual ~MemAllocator ()
 

Detailed Description

Fw::MmapAllocator is an implementation of the Fw::MemAllocator interface that back memory with a read and write capable anonymous memory mapped region. This class is currently not useful for mapping to a file.

Definition at line 22 of file MmapAllocator.hpp.

Constructor & Destructor Documentation

◆ MmapAllocator()

Fw::MmapAllocator::MmapAllocator ( )

Constructor with no arguments

Definition at line 20 of file MmapAllocator.cpp.

◆ ~MmapAllocator()

Fw::MmapAllocator::~MmapAllocator ( )
virtual

Destructor with no arguments.

Definition at line 22 of file MmapAllocator.cpp.

Member Function Documentation

◆ allocate()

void * Fw::MmapAllocator::allocate ( const NATIVE_UINT_TYPE  identifier,
NATIVE_UINT_TYPE size,
bool &  recoverable 
)
virtual

Allocate memory using the mmap allocator

Parameters
identifieridentifier to use with allocation
sizesize of memory to be allocated
recoverable(output) is this memory recoverable after a reset. Always false for mmap.

Implements Fw::MemAllocator.

Definition at line 24 of file MmapAllocator.cpp.

◆ deallocate()

void Fw::MmapAllocator::deallocate ( const NATIVE_UINT_TYPE  identifier,
void *  ptr 
)
virtual

Deallocation of memory using the mmap allocator

Parameters
identifieridentifier used at allocation
ptrpointer to memory being deallocated

Implements Fw::MemAllocator.

Definition at line 38 of file MmapAllocator.cpp.


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