package mem_usage

  1. Overview
  2. Docs
Cross-platform stats about memory usage

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.2.0.tar.gz
md5=6c5036811ec7240f659dcd8f764cf382
sha512=98062df94ad6df4c6d6925b26105d83064af658498545fc39d573e9b6441be03c29731bad55ab5aeeab26924520a7378803685f590d2cab359e1a72c282d1193

doc/mem_usage/Mem_usage/index.html

Module Mem_usageSource

Sourcetype t = {
  1. total_virtual_memory : int;
  2. total_physical_memory : int;
  3. total_used_virtual_memory : int;
  4. total_used_physical_memory : int;
  5. process_virtual_memory : int;
  6. process_physical_memory : int;
  7. process_private_memory : int;
  8. process_swapped_memory : int;
}

All values are in bytes.

  • total_virtual_memory: RAM + swap on Linux and macOS, commit limit (RAM + page files) on Windows.
  • total_used_virtual_memory: used RAM + used swap (used commit charge on Windows).
  • total_used_physical_memory: used RAM. Excludes easily reclaimable cache where the platform exposes it (buffers on Linux, inactive pages on macOS).
  • process_virtual_memory: process address-space usage (committed private bytes on Windows).
  • process_physical_memory: process resident set / working set.
  • process_private_memory: resident memory private to the process.
  • process_swapped_memory: process memory currently swapped out (approximated on Windows by committed-but-non-resident private bytes).

On FreeBSD the process_* fields are always 0: they are read from Linux-specific procfs files.

Sourceval info : unit -> t
Sourceval prettify_bytes : ?float_printer:(float -> string) -> ?signed:bool -> ?bits:bool -> ?binary:bool -> int -> string