diff options
-rw-r--r-- | lib/Support/Timer.cpp | 7 | ||||
-rw-r--r-- | support/lib/Support/Timer.cpp | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp index 625653a..26f10e7 100644 --- a/lib/Support/Timer.cpp +++ b/lib/Support/Timer.cpp @@ -10,7 +10,9 @@ #include <sys/time.h> #include <sys/unistd.h> #include <unistd.h> +#ifndef __FreeBSD__ #include <malloc.h> +#endif // __FreeBSD__ #include <stdio.h> #include <iostream> #include <algorithm> @@ -75,12 +77,13 @@ Timer::~Timer() { } static long getMemUsage() { +#ifndef __FreeBSD__ if (TrackSpace) { struct mallinfo MI = mallinfo(); return MI.uordblks/*+MI.hblkhd*/; - } else { - return 0; } +#endif // __FreeBSD__ + return 0; } struct TimeRecord { diff --git a/support/lib/Support/Timer.cpp b/support/lib/Support/Timer.cpp index 625653a..26f10e7 100644 --- a/support/lib/Support/Timer.cpp +++ b/support/lib/Support/Timer.cpp @@ -10,7 +10,9 @@ #include <sys/time.h> #include <sys/unistd.h> #include <unistd.h> +#ifndef __FreeBSD__ #include <malloc.h> +#endif // __FreeBSD__ #include <stdio.h> #include <iostream> #include <algorithm> @@ -75,12 +77,13 @@ Timer::~Timer() { } static long getMemUsage() { +#ifndef __FreeBSD__ if (TrackSpace) { struct mallinfo MI = mallinfo(); return MI.uordblks/*+MI.hblkhd*/; - } else { - return 0; } +#endif // __FreeBSD__ + return 0; } struct TimeRecord { |