|
Open3D (C++ API)
0.19.0
|
#include <MemoryManagerStatistic.h>
Public Types | |
| enum class | PrintLevel { All = 0 , Unbalanced = 1 , None = 2 } |
Public Member Functions | |
| MemoryManagerStatistic (const MemoryManagerStatistic &)=delete | |
| MemoryManagerStatistic & | operator= (MemoryManagerStatistic &)=delete |
| ~MemoryManagerStatistic () | |
| void | SetPrintLevel (PrintLevel level) |
| Sets the level of provided information for printing. | |
| void | SetPrintAtProgramEnd (bool print) |
| void | SetPrintAtMallocFree (bool print) |
| Enables or disables printing at each malloc and free. | |
| void | Print () const |
| Prints statistics for all recorded devices depending on the print level. | |
| bool | HasLeaks () const |
| void | CountMalloc (void *ptr, size_t byte_size, const Device &device) |
| Adds the given allocation to the statistics. | |
| void | CountFree (void *ptr, const Device &device) |
| void | Reset () |
| Resets the statistics. | |
Static Public Member Functions | |
| static MemoryManagerStatistic & | GetInstance () |
|
strong |
|
delete |
| open3d::core::MemoryManagerStatistic::~MemoryManagerStatistic | ( | ) |
| void open3d::core::MemoryManagerStatistic::CountFree | ( | void * | ptr, |
| const Device & | device ) |
Adds the given deallocations to the statistics. Counts for previously recorded allocations after a reset are ignored for consistency.
| void open3d::core::MemoryManagerStatistic::CountMalloc | ( | void * | ptr, |
| size_t | byte_size, | ||
| const Device & | device ) |
Adds the given allocation to the statistics.
|
static |
| bool open3d::core::MemoryManagerStatistic::HasLeaks | ( | ) | const |
Returns true if any recorded device has unbalanced counts, false otherwise.
|
delete |
| void open3d::core::MemoryManagerStatistic::Print | ( | ) | const |
Prints statistics for all recorded devices depending on the print level.
| void open3d::core::MemoryManagerStatistic::Reset | ( | ) |
Resets the statistics.
| void open3d::core::MemoryManagerStatistic::SetPrintAtMallocFree | ( | bool | ) |
Enables or disables printing at each malloc and free.
| void open3d::core::MemoryManagerStatistic::SetPrintAtProgramEnd | ( | bool | ) |
Enables or disables printing at the program end. Printing at the program end additionally overrides the exit code to EXIT_FAILURE in the presence of leaks.
| void open3d::core::MemoryManagerStatistic::SetPrintLevel | ( | PrintLevel | level | ) |
Sets the level of provided information for printing.