57 curAllocInBytes_ += numBytes;
58 if (curAllocInBytes_ > maxAllocInBytes_) {
59 maxAllocInBytes_ = curAllocInBytes_;
64 out <<
"Teuchos,alloc," << numEntries <<
"," << typeName <<
"," << numBytes << endl;
77 curAllocInBytes_ -= numBytes;
85 out <<
"Teuchos,deall,-" << numEntries <<
"," << typeName
86 <<
",-" << numBytes << endl;
100 maxAllocInBytes_ = 0;
std::size_t size_type
Type of the size of an allocation or deallocation.
static void resetAllocationCounts()
Reset the current and max total allocation numbers to zero.
static void logAllocation(std::ostream &out, const size_type numEntries, const size_type numBytes, const char typeName[], const bool verbose)
Log an allocation.
static size_type maxAllocInBytes()
Max total allocation ("high water mark") in bytes.
static void logDeallocation(std::ostream &out, const size_type numEntries, const size_type numBytes, const char typeName[], const bool verbose)
Log a deallocation, that was previously logged using logAllocation().
Declaration of Teuchos::Details::Allocator, a tracking and logging implementation of the C++ Standard...
static size_type curAllocInBytes()
Current total allocation in bytes.
std::string typeName(const T &t)
Template function for returning the concrete type name of a passed-in object.