sysctl() is the system call used to query and modify kernel parameters in BSD-derived systems including macOS. It can retrieve memory information through hardware parameters (e.g., HW_PHYSMEM). On modern Linux, reading /proc/meminfo is more common, but sysctl() remains valid. The other functions are not standard system calls for memory queries.