Skip to content

Commit ddcaca3

Browse files
committed
add comment explaining Vm* fields
Signed-off-by: Jorge Prendes <[email protected]>
1 parent 4a89ced commit ddcaca3

File tree

1 file changed

+3
-0
lines changed
  • crates/containerd-shim-wasm/src/sandbox

1 file changed

+3
-0
lines changed

crates/containerd-shim-wasm/src/sandbox/cli.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ fn get_mem(pid: u32) -> (usize, usize) {
4141
.lines()
4242
{
4343
let line = line.trim();
44+
// VmPeak is the maximum total virtual memory used so far.
45+
// VmHWM (high water mark) is the maximum resident set memory used so far.
46+
// See: https://man7.org/linux/man-pages/man5/proc_pid_status.5.html
4447
if let Some(rest) = line.strip_prefix("VmPeak:") {
4548
if let Some(rest) = rest.strip_suffix("kB") {
4649
total = rest.trim().parse().unwrap_or(0);

0 commit comments

Comments
 (0)