MemoryUtils#
Currently, this API is unsupported in Python
-
class MemoryUtils#
Utilities for memory related operations.
Public Static Functions
-
static int getUsedRam()#
Returns how much RAM has been used by the calling process, in MB.
Returns -1 if reading the amount of available memory fails. Such failure may happen, for example, when running on an unsupported operating system.
-
static int getAvailableMemory()#
Returns an estimate for how much memory is available for usage by the calling process, in MB.
Returns -1 if reading the amount of available memory fails. Such failure may happen, for example, when running on an unsupported operating system.
-
static void printMemoryStatus(const std::string &title = "", std::ostream &out = std::cout)#
Prints statistics on current memory usage.
- Parameters:
title – Optional title
out – Optional output stream (default: std::cout)
-
static int getUsedRam()#