diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-06-17 19:54:00 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-06-17 19:54:00 +0000 |
commit | 8c63883f1ff72191becfda8506e3919a50af20d8 (patch) | |
tree | 22e079a7bf6707e9ccb5636cde6b51f66f17ceeb /lib/Support/Timer.cpp | |
parent | ad110d2bb4e9622384b9170a34c282d650dafaac (diff) | |
download | external_llvm-8c63883f1ff72191becfda8506e3919a50af20d8.zip external_llvm-8c63883f1ff72191becfda8506e3919a50af20d8.tar.gz external_llvm-8c63883f1ff72191becfda8506e3919a50af20d8.tar.bz2 |
Put ifdefs around use of malloc.h/mallinfo, which isn't available on FreeBSD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Timer.cpp')
-rw-r--r-- | lib/Support/Timer.cpp | 7 |
1 files changed, 5 insertions, 2 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 { |