The sysctl() system call is used to query and modify kernel parameters, including system memory information. Options A and C refer to non-standard functions, while malloc() is for memory allocation, not querying system memory. On modern Linux, /proc/meminfo is also commonly used.