Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::MemoryUtilities Namespace Reference

Utility functions for querying system and process memory information. More...

Functions

MITKCORE_EXPORT size_t GetProcessMemoryUsage ()
 Return the memory usage of the current process in bytes. More...
 
MITKCORE_EXPORT size_t GetTotalSizeOfPhysicalRam ()
 Return the total size of physical RAM in bytes. More...
 

Detailed Description

Utility functions for querying system and process memory information.

Function Documentation

◆ GetProcessMemoryUsage()

MITKCORE_EXPORT size_t mitk::MemoryUtilities::GetProcessMemoryUsage ( )

Return the memory usage of the current process in bytes.

On Linux, this refers to the resident memory minus shared pages (as reported by the GNOME System Monitor). On Windows, this refers to the size in bytes of the working set pages (the "Speicherauslastung" column in the task manager). On macOS, this refers to the resident size minus reusable memory.

Returns
The process memory usage in bytes, or 0 if the value could not be determined.

◆ GetTotalSizeOfPhysicalRam()

MITKCORE_EXPORT size_t mitk::MemoryUtilities::GetTotalSizeOfPhysicalRam ( )

Return the total size of physical RAM in bytes.

Returns
The total physical memory in bytes, or 0 if the value could not be determined.