HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_MemoryCounterNewSafe Class Reference

#include <UT_MemoryCounter.h>

+ Inheritance diagram for UT_MemoryCounterNewSafe:

Public Member Functions

 UT_MemoryCounterNewSafe (const UT_Set< const void * > &avoidset)
 
virtual ~UT_MemoryCounterNewSafe ()
 
virtual void reset ()
 
virtual bool countShared (size_t size, exint refcount, const void *p)
 
virtual size_t getCount () const
 This returns the current count of memory used. More...
 
size_t getFullCount () const
 
size_t getUniqueCount () const
 
- Public Member Functions inherited from UT_MemoryCounter
 UT_MemoryCounter ()
 
virtual ~UT_MemoryCounter ()
 
void countUnshared (size_t size)
 
bool mustCountShared () const
 
bool mustCountUnshared () const
 

Additional Inherited Members

- Protected Member Functions inherited from UT_MemoryCounter
 UT_MemoryCounter (const bool countshared, const bool countunshared)
 

Detailed Description

This subclass counts shared memory excluding any shared memory blocks in the specified set, so that one can determine how much memory a node's output detail uses that its input details do not. Unlike UT_MemoryCounterNew, this does NOT assume that the countShared() is only called once for each shared memory block, by adding all blocks to a dynamic set of blocks to avoid. This incurs extra cost on every countShared().

Definition at line 429 of file UT_MemoryCounter.h.

Constructor & Destructor Documentation

UT_MemoryCounterNewSafe::UT_MemoryCounterNewSafe ( const UT_Set< const void * > &  avoidset)
inline

Definition at line 432 of file UT_MemoryCounter.h.

virtual UT_MemoryCounterNewSafe::~UT_MemoryCounterNewSafe ( )
inlinevirtual

Definition at line 440 of file UT_MemoryCounter.h.

Member Function Documentation

virtual bool UT_MemoryCounterNewSafe::countShared ( size_t  size,
exint  refcount,
const void p 
)
inlinevirtual

This counts shared memory according to the requirements of the use case. This implementation avoids counting any shared memory in the specified set.

Reimplemented from UT_MemoryCounter.

Definition at line 456 of file UT_MemoryCounter.h.

virtual size_t UT_MemoryCounterNewSafe::getCount ( ) const
inlinevirtual

This returns the current count of memory used.

Reimplemented from UT_MemoryCounter.

Definition at line 494 of file UT_MemoryCounter.h.

size_t UT_MemoryCounterNewSafe::getFullCount ( ) const
inline

Definition at line 499 of file UT_MemoryCounter.h.

size_t UT_MemoryCounterNewSafe::getUniqueCount ( ) const
inline

Definition at line 504 of file UT_MemoryCounter.h.

virtual void UT_MemoryCounterNewSafe::reset ( void  )
inlinevirtual

This resets any data structures used for counting to their freshly-constructed state.

Reimplemented from UT_MemoryCounter.

Definition at line 444 of file UT_MemoryCounter.h.


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