HTGS
v2.0
The Hybrid Task Graph Scheduler
|
Abstract class that describes when memory can be released/reused. More...
#include <htgs/api/IMemoryReleaseRule.hpp>
Public Member Functions | |
virtual | ~IMemoryReleaseRule () |
Destructor. | |
virtual void | memoryUsed ()=0 |
Pure virtual function to update the state of when memory has been used. | |
virtual bool | canReleaseMemory ()=0 |
Pure virtual function to indicate when memory can be released. More... | |
Abstract class that describes when memory can be released/reused.
This class is used anytime memory is requested by an ITask from a MemoryManager. To receive memory use the function ITask::getMemory
IMemoryReleaseRule is attached to the MemoryData. The MemoryData, should be added to IData as data flows through a TaskGraphConf until the memory can be released with ITask::releaseMemory
When memory is released, the MemoryManager processes the memory by first updating the state with memoryUsed(), then if canReleaseMemory() returns true, the memory will be recycled.
Example Implementation:
Example Usage:
|
pure virtual |
Pure virtual function to indicate when memory can be released.
TRUE | if memory is ready to be released |
FALSE | if memory is not ready to be released |