Skip to content

Commit

Permalink
remove memory stat code from cgroup mem calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dav1dde committed Mar 5, 2024
1 parent 8da2f05 commit 2fe6093
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/unix/linux/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,6 @@ impl crate::CGroupLimits {
limits.free_swap = sys.swap_total.saturating_sub(swap_cur);
}

read_table("/sys/fs/cgroup/memory.stat", ' ', |_key, value| {
limits.free_memory = limits.free_memory.saturating_sub(value);
});

Some(limits)
} else if let (Some(mem_cur), Some(mem_max)) = (
// cgroups v1
Expand Down

0 comments on commit 2fe6093

Please # to comment.