mirror of
https://github.com/denoland/deno.git
synced 2025-02-01 12:16:11 -05:00
Merge branch 'main' into show-remote-modules-size
This commit is contained in:
commit
046ee08749
1 changed files with 2 additions and 4 deletions
|
@ -295,11 +295,9 @@ pub fn mem_info() -> Option<MemInfo> {
|
||||||
// TODO(@littledivy): Put this in a once_cell
|
// TODO(@littledivy): Put this in a once_cell
|
||||||
let page_size = libc::sysconf(libc::_SC_PAGESIZE) as u64;
|
let page_size = libc::sysconf(libc::_SC_PAGESIZE) as u64;
|
||||||
mem_info.available =
|
mem_info.available =
|
||||||
(stat.free_count as u64 + stat.inactive_count as u64) * page_size
|
(stat.free_count as u64 + stat.inactive_count as u64) * page_size;
|
||||||
/ 1024;
|
|
||||||
mem_info.free =
|
mem_info.free =
|
||||||
(stat.free_count as u64 - stat.speculative_count as u64) * page_size
|
(stat.free_count as u64 - stat.speculative_count as u64) * page_size;
|
||||||
/ 1024;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue