about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/conf/legacy.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/conf/legacy.c b/src/conf/legacy.c
new file mode 100644
index 00000000..f1d9e325
--- /dev/null
+++ b/src/conf/legacy.c
@@ -0,0 +1,22 @@
+#include <sys/sysinfo.h>
+#include <unistd.h>
+
+int get_nprocs_conf()
+{
+	return sysconf(_SC_NPROCESSORS_CONF);
+}
+
+int get_nprocs()
+{
+	return sysconf(_SC_NPROCESSORS_ONLN);
+}
+
+long get_phys_pages()
+{
+	return sysconf(_SC_PHYS_PAGES);	
+}
+
+long get_avphys_pages()
+{
+	return sysconf(_SC_AVPHYS_PAGES);	
+}