Crate ramusage

source ·
Expand description

This crate allows you to query the used and total amount of memory of your system.

OS Support

  • Linux
  • OpenBSD (planned)

Example

use ramusage::Info;

fn main() {
    let info = Info::read().expect("Failed to read memory info.");

    println!("{info}"); // 4.00 GiB/16.0 GiB
    println!("{info:#}"); // 4.00G/16.0G
}

Structs

  • An amount of bytes.
  • System RAM usage.