Replace the procfs by libproc

This commit is contained in:
Clément Renault 2024-02-06 18:12:04 +01:00 committed by Louis Dureuil
parent d78ada07b5
commit 02dcaf07db
No known key found for this signature in database
6 changed files with 100 additions and 90 deletions

View file

@ -96,12 +96,12 @@ impl TraceLayer {
self.start_time.elapsed()
}
#[cfg(target_os = "linux")]
#[cfg(any(target_os = "linux", target_os = "macos"))]
fn memory_stats(&self) -> Option<MemoryStats> {
Some(MemoryStats::fetch().unwrap())
}
#[cfg(not(target_os = "linux"))]
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
fn memory_stats(&self) -> Option<MemoryStats> {
None
}