F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
MemAllocator.hpp
Go to the documentation of this file.
1 
16 #ifndef TYPES_MEMALLOCATOR_HPP_
17 #define TYPES_MEMALLOCATOR_HPP_
18 
19 #include <FpConfig.hpp>
20 
44 namespace Fw {
45 
46 class MemAllocator {
47  public:
49 
55  virtual void* allocate(const FwEnumStoreType identifier, FwSizeType& size, bool& recoverable) = 0;
57 
61  virtual void deallocate(const FwEnumStoreType identifier, void* ptr) = 0;
62 
63  protected:
64  MemAllocator();
65  virtual ~MemAllocator();
66 
67  private:
70 };
71 
72 } /* namespace Fw */
73 
74 #endif /* TYPES_MEMALLOCATOR_HPP_ */
virtual void * allocate(const FwEnumStoreType identifier, FwSizeType &size, bool &recoverable)=0
Allocate memory.
PlatformSizeType FwSizeType
Definition: FpConfig.h:35
virtual ~MemAllocator()
I32 FwEnumStoreType
Definition: FpConfig.h:64
C++-compatible configuration header for fprime configuration.
virtual void deallocate(const FwEnumStoreType identifier, void *ptr)=0
Deallocate memory.