KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
MemoryInfo gives the OS information about the memory usage by Kratos. More...
#include <memory_info.h>
Public Member Functions | |
Type Definitions | |
KRATOS_CLASS_POINTER_DEFINITION (MemoryInfo) | |
Pointer definition of MemoryInfo. More... | |
Life Cycle | |
MemoryInfo ()=default | |
Default constructor. More... | |
virtual | ~MemoryInfo ()=default |
Destructor. More... | |
Input and output | |
virtual std::string | Info () const |
Turn back information as a string. More... | |
virtual void | PrintInfo (std::ostream &rOStream) const |
Print information about this object. More... | |
virtual void | PrintData (std::ostream &rOStream) const |
Print object's data. More... | |
Static Public Member Functions | |
Operations | |
static std::size_t | GetPeakMemoryUsage () |
static std::size_t | GetCurrentMemoryUsage () |
static std::string | HumanReadableSize (std::size_t InBytes) |
MemoryInfo gives the OS information about the memory usage by Kratos.
This class provides the peak memory usage and current memory usage. The information is taken per OS and may vary in each execution depending on page allocation and other factors. The supported platforms are Windows, Linux and OSX.
|
default |
Default constructor.
|
virtualdefault |
Destructor.
|
static |
This function returns the physical memory used currently by this process in bytes. It returns zero for not supported operating systems. The main idea is from: http://nadeausoftware.com/articles/2012/07/c_c_tip_how_get_process_resident_set_size_physical_memory_use rewritten for c++ and with style change
|
static |
This function returns the peak memory used by this process in bytes. It returns zero for not supported operating systems. The main idea is from: http://nadeausoftware.com/articles/2012/07/c_c_tip_how_get_process_resident_set_size_physical_memory_use rewritten/reordered to have independent code for each platform and some styling applied
|
static |
|
inlinevirtual |
Turn back information as a string.
Kratos::MemoryInfo::KRATOS_CLASS_POINTER_DEFINITION | ( | MemoryInfo | ) |
Pointer definition of MemoryInfo.
|
inlinevirtual |
Print object's data.
|
inlinevirtual |
Print information about this object.