HDK
|
#include <UT_MemoryCounter.h>
Public Member Functions | |
UT_MemoryCounterTotal () | |
~UT_MemoryCounterTotal () 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 memory used. More... | |
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) | |
This subclass counts shared memory under the assumption that all memory is being counted, so on a block of memory referenced refcount times, countShared() will be called refcount times. To avoid double-counting of this shared memory, countShared() divides by refcount.
Definition at line 310 of file UT_MemoryCounter.h.
|
inline |
Definition at line 313 of file UT_MemoryCounter.h.
|
inlineoverride |
Definition at line 317 of file UT_MemoryCounter.h.
|
inlineoverridevirtual |
This counts shared memory according to the requirements of the use case. This implementation avoids double-counting of referenced memory by dividing size by the reference count.
Reimplemented from UT_MemoryCounter.
Definition at line 330 of file UT_MemoryCounter.h.
|
inlineoverridevirtual |
This returns the current count of memory used.
Reimplemented from UT_MemoryCounter.
Definition at line 338 of file UT_MemoryCounter.h.
This resets any data structures used for counting to their freshly-constructed state.
Reimplemented from UT_MemoryCounter.
Definition at line 321 of file UT_MemoryCounter.h.