|
Thrill
0.1
|
Object shared by allocators and other classes to track memory allocations.
These is one global mem::Manager per compute host. To track memory consumption of subcomponents of Thrill, one can create local child mem::Managers which report allocation automatically to their superiors.
Definition at line 28 of file manager.hpp.
Collaboration diagram for Manager:#include <manager.hpp>
Public Member Functions | |
| Manager (Manager *super, const char *name) | |
| ~Manager () | |
| Manager & | add (size_t amount) |
| add memory consumption. More... | |
| Manager & | subtract (size_t amount) |
| subtract memory consumption. More... | |
| Manager * | super () |
| return the superior Manager More... | |
| size_t | total () const |
| return total allocation (local value) More... | |
Private Attributes | |
| std::atomic< size_t > | alloc_count_ { 0 } |
| number of allocation More... | |
| const char * | name_ |
| description for output More... | |
| std::atomic< size_t > | peak_ { 0 } |
| peak allocation More... | |
| Manager * | super_ |
| reference to superior memory counter More... | |
| std::atomic< size_t > | total_ { 0 } |
| total allocation More... | |
Static Private Attributes | |
| static constexpr bool | debug = false |
Definition at line 33 of file manager.hpp.
References Manager::~Manager().
| ~Manager | ( | ) |
Definition at line 19 of file manager.cpp.
References Manager::alloc_count_, Manager::debug, thrill::mem::g_bypass_manager, Manager::name_, Manager::peak_, and Manager::total_.
Referenced by Manager::Manager().
|
inline |
add memory consumption.
Definition at line 46 of file manager.hpp.
References Manager::add(), Manager::alloc_count_, max(), Manager::peak_, Manager::super_, and Manager::total_.
Referenced by Manager::add(), and Allocator< char >::allocate().
|
inline |
subtract memory consumption.
Definition at line 55 of file manager.hpp.
References Manager::subtract(), Manager::super_, and Manager::total_.
Referenced by Allocator< char >::deallocate(), and Manager::subtract().
|
inline |
|
inline |
return total allocation (local value)
Definition at line 43 of file manager.hpp.
References Manager::total_.
Referenced by Allocator< char >::allocate(), and Allocator< char >::deallocate().
|
private |
number of allocation
Definition at line 76 of file manager.hpp.
Referenced by Manager::add(), and Manager::~Manager().
|
staticprivate |
Definition at line 30 of file manager.hpp.
Referenced by Manager::~Manager().
|
private |
description for output
Definition at line 67 of file manager.hpp.
Referenced by Manager::~Manager().
|
private |
peak allocation
Definition at line 73 of file manager.hpp.
Referenced by Manager::add(), and Manager::~Manager().
|
private |
reference to superior memory counter
Definition at line 64 of file manager.hpp.
Referenced by Manager::add(), Manager::subtract(), and Manager::super().
|
private |
total allocation
Definition at line 70 of file manager.hpp.
Referenced by Manager::add(), Manager::subtract(), Manager::total(), and Manager::~Manager().