carb::extras::SystemMemoryInfo
Defined in carb/extras/MemoryUsage.h
-
struct SystemMemoryInfo
Stores information about memory in the system.
All values are in bytes.
Public Members
-
uint64_t totalPhysical
The total available physical RAM in bytes.
This may be reported as slightly less than the expected amount due to some small amount of space being reserved for the OS. This is often negligible, but when displaying the memory amount to the user, it is good to round to the nearest mebibyte or gibibyte.
-
uint64_t availablePhysical
The available physical RAM in bytes.
This is not memory that is necessarily available to the calling process, but rather the amount of physical RAM that the OS is not actively using for all running processes at the moment.
-
uint64_t totalPageFile
The total amount of page file space available to the system in bytes.
When physical RAM is filled, this space will be used to provide a backup space for memory pages of lower priority, inactive, or background processes so that RAM can be freed up for more active or demanding processes.
-
uint64_t availablePageFile
The available amount of page file space in bytes.
This is the unused portion of the page file that the system can still make use of to keep foreground processes from starving.
-
uint64_t totalVirtual
The total amount of virtual memory available to the calling process in bytes.
This is the maximum amount of addressable space and the maximum memory address that can be used. On Windows this value should be consistent, but on Linux, this value can change depending on the owner of the process if the administrator has set differing limits for users.
-
uint64_t availableVirtual
The available amount of virtual memory in bytes still usable by the calling process.
This is the amount of memory that can still be allocated by the process. That said however, the process may not be able to actually use all of that memory if the system’s resources are exhausted. Since virtual memory space is generally much larger than the amount of available RAM and swap space on 64 bit processes, the process will still be in an out of memory situation if all of the system’s physical RAM and swap space have been consumed by the process’s demands. When looking at out of memory situations, it is also important to consider virtual memory space along with physical and swap space.
-
uint64_t totalPhysical