Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::IMemoryInfo Class Referenceabstract

Public Member Functions

virtual ~IMemoryInfo ()
 Releases resources.
virtual void createOwner (const void *owner, const TraceInfo &trace_info)=0
 Creates a reference on owner with the trace info trace_info.
virtual void setOwner (const void *owner, const TraceInfo &new_info)=0
 Modifies the info of the reference owner.
virtual void removeOwner (const void *owner)=0
 Removes the reference on owner.
virtual void addInfo (const void *owner, const void *ptr, Int64 size)=0
virtual void addInfo (const void *owner, const void *ptr, Int64 size, const void *old_ptr)=0
virtual void changeOwner (const void *new_owner, const void *ptr)=0
virtual void removeInfo (const void *owner, const void *ptr, bool can_fail=false)=0
virtual void printInfos (std::ostream &ostr)=0
virtual void beginCollect ()=0
virtual void endCollect ()=0
virtual bool isCollecting () const =0
virtual void setIteration (Integer iteration)=0
 Sets the current iteration number.
virtual void printAllocatedMemory (std::ostream &ostr, Integer iteration)=0
virtual void setTraceMng (ITraceMng *msg)=0
 Sets the ITraceMng for messages.
virtual void setKeepStackTrace (bool is_active)=0
 Indicates whether call stack saving is active.
virtual bool keepStackTrace () const =0
 Indicates if call stack saving is enabled.
virtual void setStackTraceMinAllocSize (Int64 alloc_size)=0
 Sets the minimum size of allocations whose call stack is traced.
virtual Int64 stackTraceMinAllocSize () const =0
 Minimum size of allocations whose call stack is traced.
virtual void visitAllocatedBlocks (IFunctorWithArgumentT< const MemoryInfoChunk & > *functor) const =0
 Visitor over all allocated blocks.
virtual Int64 nbAllocation () const =0

Detailed Description

Definition at line 78 of file IMemoryInfo.h.

Constructor & Destructor Documentation

◆ IMemoryInfo()

Arcane::IMemoryInfo::IMemoryInfo ( )
inlineprotected

Definition at line 82 of file IMemoryInfo.h.

◆ ~IMemoryInfo()

virtual Arcane::IMemoryInfo::~IMemoryInfo ( )
inlinevirtual

Releases resources.

Definition at line 87 of file IMemoryInfo.h.

Member Function Documentation

◆ createOwner()

virtual void Arcane::IMemoryInfo::createOwner ( const void * owner,
const TraceInfo & trace_info )
pure virtual

Creates a reference on owner with the trace info trace_info.

Implemented in Arcane::MemoryInfo.

◆ keepStackTrace()

virtual bool Arcane::IMemoryInfo::keepStackTrace ( ) const
pure virtual

Indicates if call stack saving is enabled.

Implemented in Arcane::MemoryInfo.

◆ removeOwner()

virtual void Arcane::IMemoryInfo::removeOwner ( const void * owner)
pure virtual

Removes the reference on owner.

Implemented in Arcane::MemoryInfo.

◆ setIteration()

virtual void Arcane::IMemoryInfo::setIteration ( Integer iteration)
pure virtual

Sets the current iteration number.

Implemented in Arcane::MemoryInfo.

◆ setKeepStackTrace()

virtual void Arcane::IMemoryInfo::setKeepStackTrace ( bool is_active)
pure virtual

Indicates whether call stack saving is active.

If is_active is true, it activates tracing the call stack of allocations. Tracing is conditional on the value of stackTraceMinAllocSize().

Implemented in Arcane::MemoryInfo.

◆ setOwner()

virtual void Arcane::IMemoryInfo::setOwner ( const void * owner,
const TraceInfo & new_info )
pure virtual

Modifies the info of the reference owner.

Implemented in Arcane::MemoryInfo.

◆ setStackTraceMinAllocSize()

virtual void Arcane::IMemoryInfo::setStackTraceMinAllocSize ( Int64 alloc_size)
pure virtual

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.

Implemented in Arcane::MemoryInfo.

◆ setTraceMng()

virtual void Arcane::IMemoryInfo::setTraceMng ( ITraceMng * msg)
pure virtual

Sets the ITraceMng for messages.

Implemented in Arcane::MemoryInfo.

◆ stackTraceMinAllocSize()

virtual Int64 Arcane::IMemoryInfo::stackTraceMinAllocSize ( ) const
pure virtual

Minimum size of allocations whose call stack is traced.

Implemented in Arcane::MemoryInfo.

◆ visitAllocatedBlocks()

virtual void Arcane::IMemoryInfo::visitAllocatedBlocks ( IFunctorWithArgumentT< const MemoryInfoChunk & > * functor) const
pure virtual

Visitor over all allocated blocks.

Implemented in Arcane::MemoryInfo.


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