Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
Arcane::MemoryInfo Class Reference

Classes

class  MemoryInfoSorter
class  TracePrinter

Public Member Functions

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)
Public Member Functions inherited from Arcane::IMemoryInfo
virtual ~IMemoryInfo ()
 Releases resources.

Detailed Description

Definition at line 35 of file MemoryInfo.h.

Constructor & Destructor Documentation

◆ MemoryInfo()

Arcane::MemoryInfo::MemoryInfo ( )

Definition at line 186 of file MemoryInfo.cc.

◆ ~MemoryInfo()

Arcane::MemoryInfo::~MemoryInfo ( )
virtual

Definition at line 207 of file MemoryInfo.cc.

Member Function Documentation

◆ addInfo() [1/2]

void Arcane::MemoryInfo::addInfo ( const void * owner,
const void * ptr,
Int64 size )
virtual

Implements Arcane::IMemoryInfo.

Definition at line 227 of file MemoryInfo.cc.

◆ addInfo() [2/2]

void Arcane::MemoryInfo::addInfo ( const void * owner,
const void * ptr,
Int64 size,
const void * old_ptr )
virtual

Implements Arcane::IMemoryInfo.

Definition at line 279 of file MemoryInfo.cc.

◆ beginCollect()

void Arcane::MemoryInfo::beginCollect ( )
virtual

Implements Arcane::IMemoryInfo.

Definition at line 535 of file MemoryInfo.cc.

◆ changeOwner()

void Arcane::MemoryInfo::changeOwner ( const void * new_owner,
const void * ptr )
virtual

Implements Arcane::IMemoryInfo.

Definition at line 288 of file MemoryInfo.cc.

◆ checkMemory()

void Arcane::MemoryInfo::checkMemory ( const void * owner,
Int64 size )

Definition at line 577 of file MemoryInfo.cc.

◆ createOwner()

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

Creates a reference on owner with the trace info trace_info.

Implements Arcane::IMemoryInfo.

Definition at line 262 of file MemoryInfo.cc.

◆ endCollect()

void Arcane::MemoryInfo::endCollect ( )
virtual

Implements Arcane::IMemoryInfo.

Definition at line 559 of file MemoryInfo.cc.

◆ isCollecting()

bool Arcane::MemoryInfo::isCollecting ( ) const
virtual

Implements Arcane::IMemoryInfo.

Definition at line 568 of file MemoryInfo.cc.

◆ keepStackTrace()

virtual bool Arcane::MemoryInfo::keepStackTrace ( ) const
inlinevirtual

Indicates if call stack saving is enabled.

Implements Arcane::IMemoryInfo.

Definition at line 84 of file MemoryInfo.h.

◆ nbAllocation()

virtual Int64 Arcane::MemoryInfo::nbAllocation ( ) const
inlinevirtual

Implements Arcane::IMemoryInfo.

Definition at line 91 of file MemoryInfo.h.

◆ printAllocatedMemory()

void Arcane::MemoryInfo::printAllocatedMemory ( std::ostream & ostr,
Integer iteration )
virtual

Implements Arcane::IMemoryInfo.

Definition at line 492 of file MemoryInfo.cc.

◆ printInfos()

void Arcane::MemoryInfo::printInfos ( std::ostream & ostr)
virtual

Implements Arcane::IMemoryInfo.

Definition at line 428 of file MemoryInfo.cc.

◆ removeInfo()

void Arcane::MemoryInfo::removeInfo ( const void * owner,
const void * ptr,
bool can_fail )
virtual

Implements Arcane::IMemoryInfo.

Definition at line 333 of file MemoryInfo.cc.

◆ removeOwner()

void Arcane::MemoryInfo::removeOwner ( const void * owner)
virtual

Removes the reference on owner.

Implements Arcane::IMemoryInfo.

Definition at line 324 of file MemoryInfo.cc.

◆ setIteration()

virtual void Arcane::MemoryInfo::setIteration ( Integer iteration)
inlinevirtual

Sets the current iteration number.

Implements Arcane::IMemoryInfo.

Definition at line 68 of file MemoryInfo.h.

◆ setKeepStackTrace()

virtual void Arcane::MemoryInfo::setKeepStackTrace ( bool is_active)
inlinevirtual

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().

Implements Arcane::IMemoryInfo.

Definition at line 83 of file MemoryInfo.h.

◆ setOwner()

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

Modifies the info of the reference owner.

Implements Arcane::IMemoryInfo.

Definition at line 215 of file MemoryInfo.cc.

◆ 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

Sets the ITraceMng for messages.

Implements Arcane::IMemoryInfo.

Definition at line 526 of file MemoryInfo.cc.

◆ stackTraceMinAllocSize()

virtual Int64 Arcane::MemoryInfo::stackTraceMinAllocSize ( ) const
inlinevirtual

Minimum size of allocations whose call stack is traced.

Implements Arcane::IMemoryInfo.

Definition at line 87 of file MemoryInfo.h.

◆ visitAllocatedBlocks()

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

Visitor over all allocated blocks.

Implements Arcane::IMemoryInfo.

Definition at line 647 of file MemoryInfo.cc.


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