![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
#include <Fw/Types/MemAllocator.hpp>
Public Member Functions | |
| void | registerAllocator (const MemoryAllocation::MemoryAllocatorType type, MemAllocator &allocator) |
| register an allocator for the given type More... | |
| MemAllocator & | getAllocator (const MemoryAllocation::MemoryAllocatorType type) |
| MemAllocator & | getAnAllocator (const MemoryAllocation::MemoryAllocatorType type) |
Static Public Member Functions | |
| static MemAllocatorRegistry & | getInstance () |
| get the singleton registry More... | |
Definition at line 134 of file MemAllocator.hpp.
| MemAllocator & Fw::MemAllocatorRegistry::getAllocator | ( | const MemoryAllocation::MemoryAllocatorType | type | ) |
Get an allocator for a type
Return the memory allocator for the given type. It is an error to request an allocator for a type that has not been registered.
| type | the type of allocator |
Definition at line 52 of file MemAllocator.cpp.
| MemAllocator & Fw::MemAllocatorRegistry::getAnAllocator | ( | const MemoryAllocation::MemoryAllocatorType | type | ) |
Get an allocator for a type with default
Return the memory allocator for the given type. If the type has not been registered, then return the allocator registered to MemoryAllocatorType::SYSTEM. It is an error if SYSTEM has not been registered.
| type | the type of allocator |
Definition at line 57 of file MemAllocator.cpp.
|
static |
get the singleton registry
Definition at line 47 of file MemAllocator.cpp.
| void Fw::MemAllocatorRegistry::registerAllocator | ( | const MemoryAllocation::MemoryAllocatorType | type, |
| MemAllocator & | allocator | ||
| ) |
register an allocator for the given type
This will register an allocator for the given type. If the allocator is already registered it will overwrite.
| type | the type of allocator |
| allocator | the allocator. The registry does not take ownership of the allocator. |
Definition at line 42 of file MemAllocator.cpp.