![]() |
OpenMS
|
Some functions to get system information. More...
#include <OpenMS/SYSTEM/SysInfo.h>
Classes | |
| struct | MemUsage |
| A convenience class to report either absolute or delta (between two timepoints) RAM usage. More... | |
Static Public Member Functions | |
| static bool | getProcessMemoryConsumption (size_t &mem_virtual) |
| static bool | getProcessPeakMemoryConsumption (size_t &mem_virtual) |
| static bool | getFreeSystemMemory (size_t &mem_available) |
| Get currently available physical system memory in KiloBytes (KB). | |
| static Int64 | getProcessId () |
Some functions to get system information.
Supports current memory and peak memory consumption.
|
static |
Get currently available physical system memory in KiloBytes (KB).
On Linux this prefers MemAvailable from /proc/meminfo so file-system cache that can be reclaimed by the kernel is counted as available.
| [out] | mem_available | Available physical system memory |
mem_available is set to 0.
|
static |
@brief Get the current process ID
@return The process ID of the current process
|
static |
Get memory consumption in KiloBytes (KB) On Windows, this is equivalent to 'Peak Working Set (Memory)' in Task Manager. On other OS this might be very unreliable, depending on operating system and kernel version.
| [out] | mem_virtual | Total virtual memory currently allocated by this process |
mem_virtual is set to 0.
|
static |
Get peak memory consumption in KiloBytes (KB) On Windows, this is equivalent to 'Working Set (Memory)' in Task Manager. On other OS this might be very unreliable, depending on operating system and kernel version.
| [out] | mem_virtual | Total virtual memory allocated by this process |
mem_virtual is set to 0.