Skip to content
Snippets Groups Projects
Commit b5a6a24c authored by Veronique Legrand's avatar Veronique Legrand
Browse files

fixed compilation issue under linux

parent 44cf8fda
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
#include <iostream> #include <iostream>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/sysctl.h> #include <sys/sysctl.h>
#if !defined(_SC_PHYS_PAGES) and !__APPLE__
#include <sys/sysinfo.h>
#endif
#include "low_level_utils.h" #include "low_level_utils.h"
using namespace std; using namespace std;
...@@ -51,8 +54,7 @@ unsigned long getNodePhysMemory() { ...@@ -51,8 +54,7 @@ unsigned long getNodePhysMemory() {
mem=0; mem=0;
} }
mem /= 1 * 1024 * 1024 * 1024; mem /= 1 * 1024 * 1024 * 1024;
#else #elif !defined(_SC_PHYS_PAGES) and !__APPLE__
#include <sys/sysinfo.h>
struct sysinfo si; struct sysinfo si;
int ret=sysinfo(&si); int ret=sysinfo(&si);
if (ret==-1) { if (ret==-1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment