Memory usage information collector.
More...
#include <arcane/utils/MemoryInfo.h>
|
| virtual void | createOwner (const void *owner, const TraceInfo &trace_info) |
| | Creates a reference on owner with the trace info trace_info.
|
| virtual void | setOwner (const void *owner, const TraceInfo &new_info) |
| | Modifies the info of the reference owner.
|
| virtual void | removeOwner (const void *owner) |
| | Removes the reference on owner.
|
| virtual void | addInfo (const void *owner, const void *ptr, Int64 size) |
| virtual void | addInfo (const void *owner, const void *ptr, Int64 size, const void *old_ptr) |
| virtual void | removeInfo (const void *owner, const void *ptr, bool can_fail) |
| virtual void | changeOwner (const void *new_owner, const void *ptr) |
| virtual void | printInfos (std::ostream &ostr) |
| virtual void | setIteration (Integer iteration) |
| | Sets the current iteration number.
|
| virtual void | printAllocatedMemory (std::ostream &ostr, Integer iteration) |
| virtual void | setTraceMng (ITraceMng *trace) |
| | Sets the ITraceMng for messages.
|
| virtual void | beginCollect () |
| virtual void | endCollect () |
| virtual bool | isCollecting () const |
| virtual void | setKeepStackTrace (bool is_active) |
| | Indicates whether call stack saving is active.
|
| virtual bool | keepStackTrace () const |
| | Indicates if call stack saving is enabled.
|
| virtual void | setStackTraceMinAllocSize (Int64 alloc_size) |
| | Sets the minimum size of allocations whose call stack is traced.
|
| virtual Int64 | stackTraceMinAllocSize () const |
| | Minimum size of allocations whose call stack is traced.
|
| virtual void | visitAllocatedBlocks (IFunctorWithArgumentT< const MemoryInfoChunk & > *functor) const |
| | Visitor over all allocated blocks.
|
| virtual Int64 | nbAllocation () const |
| void | checkMemory (const void *owner, Int64 size) |
| virtual | ~IMemoryInfo () |
| | Releases resources.
|
Memory usage information collector.
Definition at line 35 of file MemoryInfo.h.
◆ MemoryInfoMap
| typedef std::map<const void*, MemoryInfoChunk> Arcane::MemoryInfo::MemoryInfoMap |
|
private |
◆ MemoryTraceInfoMap
| typedef std::map<const void*, TraceInfo> Arcane::MemoryInfo::MemoryTraceInfoMap |
|
private |
◆ MemoryInfo()
| Arcane::MemoryInfo::MemoryInfo |
( |
| ) |
|
◆ ~MemoryInfo()
| Arcane::MemoryInfo::~MemoryInfo |
( |
| ) |
|
|
virtual |
◆ _getTraceInfo()
| TraceInfo * Arcane::MemoryInfo::_getTraceInfo |
( |
const void * | owner | ) |
|
|
private |
◆ _printInfos()
| void Arcane::MemoryInfo::_printInfos |
( |
std::ostream & | ostr | ) |
|
|
private |
◆ _removeMemory()
| void Arcane::MemoryInfo::_removeMemory |
( |
const void * | owner, |
|
|
Int64 | size ) |
|
private |
◆ _removeOwner()
| void Arcane::MemoryInfo::_removeOwner |
( |
const void * | owner | ) |
|
|
private |
◆ addInfo() [1/2]
| void Arcane::MemoryInfo::addInfo |
( |
const void * | owner, |
|
|
const void * | ptr, |
|
|
Int64 | size ) |
|
virtual |
◆ addInfo() [2/2]
| void Arcane::MemoryInfo::addInfo |
( |
const void * | owner, |
|
|
const void * | ptr, |
|
|
Int64 | size, |
|
|
const void * | old_ptr ) |
|
virtual |
◆ beginCollect()
| void Arcane::MemoryInfo::beginCollect |
( |
| ) |
|
|
virtual |
◆ changeOwner()
| void Arcane::MemoryInfo::changeOwner |
( |
const void * | new_owner, |
|
|
const void * | ptr ) |
|
virtual |
◆ checkMemory()
| void Arcane::MemoryInfo::checkMemory |
( |
const void * | owner, |
|
|
Int64 | size ) |
◆ createOwner()
| void Arcane::MemoryInfo::createOwner |
( |
const void * | owner, |
|
|
const TraceInfo & | trace_info ) |
|
virtual |
◆ endCollect()
| void Arcane::MemoryInfo::endCollect |
( |
| ) |
|
|
virtual |
◆ isCollecting()
| bool Arcane::MemoryInfo::isCollecting |
( |
| ) |
const |
|
virtual |
◆ keepStackTrace()
| virtual bool Arcane::MemoryInfo::keepStackTrace |
( |
| ) |
const |
|
inlinevirtual |
◆ nbAllocation()
| virtual Int64 Arcane::MemoryInfo::nbAllocation |
( |
| ) |
const |
|
inlinevirtual |
◆ printAllocatedMemory()
| void Arcane::MemoryInfo::printAllocatedMemory |
( |
std::ostream & | ostr, |
|
|
Integer | iteration ) |
|
virtual |
◆ printInfos()
| void Arcane::MemoryInfo::printInfos |
( |
std::ostream & | ostr | ) |
|
|
virtual |
◆ removeInfo()
| void Arcane::MemoryInfo::removeInfo |
( |
const void * | owner, |
|
|
const void * | ptr, |
|
|
bool | can_fail ) |
|
virtual |
◆ removeOwner()
| void Arcane::MemoryInfo::removeOwner |
( |
const void * | owner | ) |
|
|
virtual |
◆ setIteration()
| virtual void Arcane::MemoryInfo::setIteration |
( |
Integer | iteration | ) |
|
|
inlinevirtual |
◆ setKeepStackTrace()
| virtual void Arcane::MemoryInfo::setKeepStackTrace |
( |
bool | is_active | ) |
|
|
inlinevirtual |
◆ setOwner()
| void Arcane::MemoryInfo::setOwner |
( |
const void * | owner, |
|
|
const TraceInfo & | new_info ) |
|
virtual |
◆ setStackTraceMinAllocSize()
| virtual void Arcane::MemoryInfo::setStackTraceMinAllocSize |
( |
Int64 | alloc_size | ) |
|
|
inlinevirtual |
Sets the minimum size of allocations whose call stack is traced.
For all allocations above alloc_size, the call stack is preserved in order to identify memory leaks. The memory and CPU cost of preserving a call stack is significant, and it is therefore not recommended to set a value too low (below 1000) for alloc_size. Call stack preservation is disabled if keepStackTrace() equals false.
Implements Arcane::IMemoryInfo.
Definition at line 86 of file MemoryInfo.h.
◆ setTraceMng()
| void Arcane::MemoryInfo::setTraceMng |
( |
ITraceMng * | msg | ) |
|
|
virtual |
◆ stackTraceMinAllocSize()
| virtual Int64 Arcane::MemoryInfo::stackTraceMinAllocSize |
( |
| ) |
const |
|
inlinevirtual |
◆ visitAllocatedBlocks()
◆ m_alloc_id
| Int64 Arcane::MemoryInfo::m_alloc_id |
|
private |
◆ m_biggest_allocated
| Int64 Arcane::MemoryInfo::m_biggest_allocated |
|
private |
◆ m_current_allocated
| Int64 Arcane::MemoryInfo::m_current_allocated |
|
private |
◆ m_display_max_alloc
| bool Arcane::MemoryInfo::m_display_max_alloc |
|
private |
◆ m_in_display
| bool Arcane::MemoryInfo::m_in_display |
|
private |
◆ m_info_big_alloc
| Int64 Arcane::MemoryInfo::m_info_big_alloc |
|
private |
◆ m_info_biggest_minimal
| Int64 Arcane::MemoryInfo::m_info_biggest_minimal |
|
private |
◆ m_info_peak_minimal
| Int64 Arcane::MemoryInfo::m_info_peak_minimal |
|
private |
◆ m_infos
| MemoryInfoMap Arcane::MemoryInfo::m_infos |
|
private |
◆ m_is_first_collect
| bool Arcane::MemoryInfo::m_is_first_collect |
|
private |
◆ m_is_stack_trace_active
| bool Arcane::MemoryInfo::m_is_stack_trace_active |
|
private |
◆ m_iteration
| Integer Arcane::MemoryInfo::m_iteration |
|
private |
◆ m_max_allocated
| Int64 Arcane::MemoryInfo::m_max_allocated |
|
private |
◆ m_owner_infos
| MemoryTraceInfoMap Arcane::MemoryInfo::m_owner_infos |
|
private |
◆ m_trace
The documentation for this class was generated from the following files: