0
0
Fork 0
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:
HasanAlrimawi 2024-12-24 09:42:10 +02:00 committed by GitHub
commit 046ee08749
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
} }
} }
} }