From efad02873995e7fd35239e07a2edda919397b8d7 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Thu, 9 Oct 2025 21:15:03 +0700 Subject: [PATCH] Fix getting total memory --- src/header/unistd/sysconf/redox.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/header/unistd/sysconf/redox.rs b/src/header/unistd/sysconf/redox.rs index a16b284f78..be772ae3d6 100644 --- a/src/header/unistd/sysconf/redox.rs +++ b/src/header/unistd/sysconf/redox.rs @@ -66,7 +66,7 @@ pub(super) fn sysconf_impl(name: c_int) -> c_long { _SC_HOST_NAME_MAX => 64, _SC_NPROCESSORS_CONF => get_cpu_count().unwrap_or(None).unwrap_or(1), _SC_NPROCESSORS_ONLN => get_cpu_count().unwrap_or(None).unwrap_or(1), - _SC_PHYS_PAGES => get_mem_stat().map(|s| s.f_bsize as c_long).unwrap_or(-1), + _SC_PHYS_PAGES => get_mem_stat().map(|s| s.f_blocks as c_long).unwrap_or(-1), _SC_AVPHYS_PAGES => get_mem_stat().map(|s| s.f_bfree as c_long).unwrap_or(-1), _SC_SIGQUEUE_MAX => 32, _SC_REALTIME_SIGNALS => 202405,