25 curAllocInBytes_ += numBytes;
26 if (curAllocInBytes_ > maxAllocInBytes_) {
27 maxAllocInBytes_ = curAllocInBytes_;
32 out <<
"Teuchos,alloc," << numEntries <<
"," << typeName <<
"," << numBytes << endl;
45 curAllocInBytes_ -= numBytes;
53 out <<
"Teuchos,deall,-" << numEntries <<
"," << typeName
54 <<
",-" << numBytes << endl;
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.