7 #include "fwMemory/policy/AlwaysDump.hpp" 8 #include "fwMemory/policy/BarrierDump.hpp" 9 #include "fwMemory/policy/registry/macros.hpp" 22 void AlwaysDump::allocationRequest( BufferInfo &info, ::fwMemory::BufferManager::ConstBufferPtrType buffer,
23 BufferInfo::SizeType size )
25 FwCoreNotUsedMacro(info);
26 FwCoreNotUsedMacro(buffer);
27 FwCoreNotUsedMacro(size);
33 void AlwaysDump::setRequest( BufferInfo &info, ::fwMemory::BufferManager::ConstBufferPtrType buffer,
34 BufferInfo::SizeType size )
36 FwCoreNotUsedMacro(info);
37 FwCoreNotUsedMacro(buffer);
38 FwCoreNotUsedMacro(size);
44 void AlwaysDump::reallocateRequest( BufferInfo &info, ::fwMemory::BufferManager::ConstBufferPtrType buffer,
45 BufferInfo::SizeType newSize )
47 FwCoreNotUsedMacro(info);
48 FwCoreNotUsedMacro(buffer);
49 FwCoreNotUsedMacro(newSize);
55 void AlwaysDump::destroyRequest( BufferInfo &info, ::fwMemory::BufferManager::ConstBufferPtrType buffer )
57 FwCoreNotUsedMacro(info);
58 FwCoreNotUsedMacro(buffer);
64 void AlwaysDump::lockRequest( BufferInfo &info, ::fwMemory::BufferManager::ConstBufferPtrType buffer )
66 FwCoreNotUsedMacro(info);
67 FwCoreNotUsedMacro(buffer);
73 void AlwaysDump::unlockRequest( BufferInfo &info, ::fwMemory::BufferManager::ConstBufferPtrType buffer )
75 FwCoreNotUsedMacro(info);
76 FwCoreNotUsedMacro(buffer);
82 void AlwaysDump::dumpSuccess( BufferInfo &info, ::fwMemory::BufferManager::ConstBufferPtrType buffer )
84 FwCoreNotUsedMacro(info);
85 FwCoreNotUsedMacro(buffer);
90 void AlwaysDump::restoreSuccess( BufferInfo &info, ::fwMemory::BufferManager::ConstBufferPtrType buffer )
92 FwCoreNotUsedMacro(info);
93 FwCoreNotUsedMacro(buffer);
98 size_t AlwaysDump::dump()
105 const ::fwMemory::BufferManager::BufferInfoMapType bufferInfos = manager->getBufferInfos().get();
107 for(const ::fwMemory::BufferManager::BufferInfoMapType::value_type &elt : bufferInfos)
109 const ::fwMemory::BufferInfo &info = elt.second;
110 if( !( info.size == 0 || info.lockCount() > 0 || !info.loaded ) )
112 if( manager->dumpBuffer(elt.first).get() )
114 dumped += elt.second.size;
125 void AlwaysDump::apply()
132 void AlwaysDump::refresh()
139 std::string AlwaysDump::getParam(
const std::string &name,
bool *ok )
const 141 FwCoreNotUsedMacro(name);
The namespace fwMemory contains tools to manage memory. Use for dump.
static FWMEMORY_API BufferManager::sptr getDefault()
Returns the current BufferManager instance.