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

#include <UT_MemoryCounter.h>

+ Inheritance diagram for UT_MemoryCounterNew:

Public Member Functions

 UT_MemoryCounterNew (const UT::ArraySet< const void * > &avoidset)
 
 ~UT_MemoryCounterNew () override
 
void reset () override
 
bool countShared (size_t size, exint refcount, const void *p) override
 
size_t getCount () const override
 This returns the current count of "new" 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. NOTE: This assumes that countShared() is called at most once for each shared memory block, because unlike UT_MemoryCounterNewSafe, it doesn't add each counted block to a set of blocks to avoid.

Definition at line 356 of file UT_MemoryCounter.h.

Constructor & Destructor Documentation

UT_MemoryCounterNew::UT_MemoryCounterNew ( const UT::ArraySet< const void * > &  avoidset)
inline

Definition at line 359 of file UT_MemoryCounter.h.

UT_MemoryCounterNew::~UT_MemoryCounterNew ( )
inlineoverride

Definition at line 366 of file UT_MemoryCounter.h.

Member Function Documentation

bool UT_MemoryCounterNew::countShared ( size_t  size,
exint  refcount,
const void p 
)
inlineoverridevirtual

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 381 of file UT_MemoryCounter.h.

size_t UT_MemoryCounterNew::getCount ( ) const
inlineoverridevirtual

This returns the current count of "new" memory used.

Reimplemented from UT_MemoryCounter.

Definition at line 400 of file UT_MemoryCounter.h.

size_t UT_MemoryCounterNew::getFullCount ( ) const
inline

Definition at line 405 of file UT_MemoryCounter.h.

size_t UT_MemoryCounterNew::getUniqueCount ( ) const
inline

Definition at line 410 of file UT_MemoryCounter.h.

void UT_MemoryCounterNew::reset ( void  )
inlineoverridevirtual

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

Reimplemented from UT_MemoryCounter.

Definition at line 370 of file UT_MemoryCounter.h.


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