12 #ifndef THRILL_MEM_MANAGER_HEADER 13 #define THRILL_MEM_MANAGER_HEADER 30 static constexpr
bool debug =
false;
47 size_t current = (
total_ += amount);
73 std::atomic<size_t>
peak_ { 0 };
82 #endif // !THRILL_MEM_MANAGER_HEADER static uint_pair max()
return an uint_pair instance containing the largest value possible
const char * name_
description for output
Manager & add(size_t amount)
add memory consumption.
Manager & subtract(size_t amount)
subtract memory consumption.
Manager(Manager *super, const char *name)
std::atomic< size_t > alloc_count_
number of allocation
Manager * super()
return the superior Manager
Manager * super_
reference to superior memory counter
std::atomic< size_t > peak_
peak allocation
size_t total() const
return total allocation (local value)
Object shared by allocators and other classes to track memory allocations.
static constexpr bool debug
std::atomic< size_t > total_
total allocation