Module: sys.platform

Source: ./sys/platform.reef


Overview

sys/platform - System and platform information

Provides functions to query CPU, memory, and platform characteristics. Useful for system-aware applications, resource management, and debugging.


Functions

fn cpu_count(): int

Returns the number of logical CPUs available

fn cpu_vendor(): string

Returns the CPU vendor string (e.g., "GenuineIntel", "AuthenticAMD")

fn cpu_brand(): string

Returns the CPU brand string (e.g., "Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz")

fn total_memory(): int64

Returns total physical RAM in bytes

fn available_memory(): int64

Returns available (free) RAM in bytes

fn page_size(): int

Returns the system page size in bytes (typically 4096)

fn os_name(): string

Returns the OS name ("linux", "darwin", "windows", "freebsd", etc.)

fn arch(): string

Returns the CPU architecture ("x86_64", "aarch64", "arm", "riscv64", etc.)


Generated by reefc doc