fw4spl
fwMemory::policy::ValveDump Class Reference

Valve dump policy. More...

#include <ValveDump.hpp>

+ Inheritance diagram for fwMemory::policy::ValveDump:
+ Collaboration diagram for fwMemory::policy::ValveDump:

Public Member Functions

virtual bool isA (const std::string &type) const override
 
virtual FWMEMORY_API void allocationRequest (BufferInfo &info,::fwMemory::BufferManager::ConstBufferPtrType buffer, BufferInfo::SizeType size) override
 
virtual FWMEMORY_API void setRequest (BufferInfo &info,::fwMemory::BufferManager::ConstBufferPtrType buffer, BufferInfo::SizeType size) override
 
virtual FWMEMORY_API void reallocateRequest (BufferInfo &info,::fwMemory::BufferManager::ConstBufferPtrType buffer, BufferInfo::SizeType newSize) override
 
virtual FWMEMORY_API void destroyRequest (BufferInfo &info,::fwMemory::BufferManager::ConstBufferPtrType buffer) override
 
virtual FWMEMORY_API void lockRequest (BufferInfo &info,::fwMemory::BufferManager::ConstBufferPtrType buffer) override
 
virtual FWMEMORY_API void unlockRequest (BufferInfo &info,::fwMemory::BufferManager::ConstBufferPtrType buffer) override
 
virtual FWMEMORY_API void dumpSuccess (BufferInfo &info,::fwMemory::BufferManager::ConstBufferPtrType buffer) override
 
virtual FWMEMORY_API void restoreSuccess (BufferInfo &info,::fwMemory::BufferManager::ConstBufferPtrType buffer) override
 
virtual FWMEMORY_API void refresh () override
 
FWMEMORY_API bool setParam (const std::string &name, const std::string &value) override
 
virtual FWMEMORY_API std::string getParam (const std::string &name, bool *ok=NULL) const override
 
FWMEMORY_APIconst::fwMemory::IPolicy::ParamNamesType & getParamNames () const override
 
- Public Member Functions inherited from fwCore::BaseObject

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
- Static Public Member Functions inherited from fwCore::BaseObject
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Protected Member Functions

FWMEMORY_API bool needDump (size_t supplement) const
 
FWMEMORY_API size_t dump (size_t nbOfBytes)
 
FWMEMORY_API void apply (size_t supplement=0)
 

Protected Attributes

size_t m_minFreeMem
 
size_t m_hysteresisOffset
 

Friends

template<class , class , class >
class ::fwTools::ClassFactory
 
class ::fwTools::Factory
 

Demangling methods

virtual const std::string & getLeafClassname () const override
 return object's classname without its namespace, i.e. BaseObject
 
virtual const std::string & getClassname () const override
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Additional Inherited Members

- Public Types inherited from fwMemory::IPolicy
typedef std::shared_ptr< IPolicysptr
 
typedef std::vector< std::string > ParamNamesType
 

Detailed Description

Valve dump policy.

This policy is monitoring system memory usage and will trigger memory dump when the amount of system free memory is lower than the minFreeMem parameter.

An hysteresis parameter exists to free more memory when the process is triggered. If the free system memory amount is lower than the minFreeMem, this policy will try to reach minFreeMem + hysteresisOffset bytes of free memory.

Definition at line 35 of file ValveDump.hpp.


The documentation for this class was generated from the following files: