F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
MallocAllocator.hpp
Go to the documentation of this file.
1 
13 #ifndef TYPES_MALLOCALLOCATOR_HPP_
14 #define TYPES_MALLOCALLOCATOR_HPP_
15 
17 
18 namespace Fw {
19 
26 class MallocAllocator : public MemAllocator {
27  public:
28  MallocAllocator() = default;
29  virtual ~MallocAllocator() = default;
30 
41  void* allocate(const FwEnumStoreType identifier,
42  FwSizeType& size,
43  bool& recoverable,
44  FwSizeType alignment = alignof(std::max_align_t)) override;
52  void deallocate(const FwEnumStoreType identifier, void* ptr) override;
53 };
54 
55 } /* namespace Fw */
56 
57 #endif /* TYPES_MALLOCALLOCATOR_HPP_ */
void * allocate(const FwEnumStoreType identifier, FwSizeType &size, bool &recoverable, FwSizeType alignment=alignof(std::max_align_t)) override
PlatformSizeType FwSizeType
I32 FwEnumStoreType
void deallocate(const FwEnumStoreType identifier, void *ptr) override
malloc based memory allocator
Memory Allocation base class.
Defines a base class for a memory allocator for classes.
Implementation of malloc based allocator.
MallocAllocator()=default
virtual ~MallocAllocator()=default