Expand description
Runtime memory profiling.
Reads process RSS (Resident Set Size) on macOS (via Mach task_info) and
Linux (via /proc/self/statm). Returns 0 on unsupported platforms.
§Usage
use pictor_runtime::memory::{get_rss_bytes, MemoryProfiler};
let profiler = MemoryProfiler::new();
let snapshot = profiler.sample();
println!("RSS: {} bytes", snapshot.rss_bytes);
println!("Peak RSS: {} bytes", profiler.peak_rss_bytes());Structs§
- Memory
Profiler - Simple memory profiler that tracks peak RSS usage over its lifetime.
- Memory
Snapshot - Memory snapshot at a point in time.
Functions§
- get_
rss_ bytes - Get current process RSS (Resident Set Size) in bytes.