|
vecmem 1.22.0
|
Class collecting some basic set of memory allocation statistics. More...
#include <vecmem/utils/memory_monitor.hpp>
Public Member Functions | |
| memory_monitor (instrumenting_memory_resource &resource) | |
| Constructor with a memory resource reference. | |
| std::size_t | total_allocation () const |
| Get the total amount of allocations. | |
| std::size_t | outstanding_allocation () const |
| Get the outstanding allocation left after all operations. | |
| std::size_t | average_allocation () const |
| Get the average allocation size. | |
| std::size_t | maximal_allocation () const |
| Get the maximal concurrent allocation. | |
Class collecting some basic set of memory allocation statistics.
Objects of this class can be used together with vecmem::instrumenting_memory_resource to easily access a common set of useful performance metrics about an application.
Note that the lifetime of this object must be at least as long as the lifetime of the connected memory resource!