![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
#include <Fw/Types/MmapAllocator.hpp>
Public Member Functions | |
| MmapAllocator (int mmap_flags=MAP_PRIVATE|MAP_ANONYMOUS) | |
| virtual | ~MmapAllocator () |
| Destructor with no arguments. More... | |
| void * | allocate (const FwEnumStoreType identifier, FwSizeType &size, bool &recoverable, FwSizeType alignment=alignof(std::max_align_t)) override |
| void | deallocate (const FwEnumStoreType identifier, void *ptr) override |
Public Member Functions inherited from Fw::MemAllocator | |
| void * | allocate (const FwEnumStoreType identifier, FwSizeType &size, FwSizeType alignment=alignof(std::max_align_t)) |
| void * | checkedAllocate (const FwEnumStoreType identifier, FwSizeType &size, bool &recoverable, FwSizeType alignment=alignof(std::max_align_t)) |
| void * | checkedAllocate (const FwEnumStoreType identifier, FwSizeType &size, FwSizeType alignment=alignof(std::max_align_t)) |
Additional Inherited Members | |
Protected Member Functions inherited from Fw::MemAllocator | |
| MemAllocator () | |
| virtual | ~MemAllocator () |
Fw::MmapAllocator is an implementation of the Fw::MemAllocator interface that backs memory with a read and write capable anonymous memory mapped region.
| C | - Number of allocations supported by this allocator. munmap needs the size of the original mapping. MmapAllocator keeps these sizes in a Map structure with a compile time limit on allocations |
Definition at line 33 of file MmapAllocator.hpp.
|
explicit |
Constructor with one default argument
Definition at line 66 of file MmapAllocator.hpp.
|
virtual |
Destructor with no arguments.
Definition at line 69 of file MmapAllocator.hpp.
|
overridevirtual |
Allocate memory using the mmap allocator
| identifier | identifier to use with allocation |
| size | size of memory to be allocated |
| recoverable | (output) is this memory recoverable after a reset. Always false for mmap. |
| alignment | - alignment requirement for the allocation. Default: maximum alignment defined by C++. |
Implements Fw::MemAllocator.
Definition at line 72 of file MmapAllocator.hpp.
|
overridevirtual |
Deallocation of memory using the mmap allocator
| identifier | identifier used at allocation |
| ptr | pointer to memory being deallocated |
Implements Fw::MemAllocator.
Definition at line 108 of file MmapAllocator.hpp.