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 | ad3aabd47a6b9d3dee4628e067f72ac8a464c051 (patch) | |
tree | a99c81055ae093190e3b3dc7c9ed350d718d93e3 /llvm/lib/Support/Timer.cpp | |
parent | ce5ee39319a1cb6ec78ee1e00a57cf69b901a32d (diff) | |
download | bcm5719-llvm-ad3aabd47a6b9d3dee4628e067f72ac8a464c051.tar.gz bcm5719-llvm-ad3aabd47a6b9d3dee4628e067f72ac8a464c051.zip |
Put ifdefs around use of malloc.h/mallinfo, which isn't available on FreeBSD.
llvm-svn: 6750
Diffstat (limited to 'llvm/lib/Support/Timer.cpp')
-rw-r--r-- | llvm/lib/Support/Timer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp index 625653afe1a..26f10e77f77 100644 --- a/llvm/lib/Support/Timer.cpp +++ b/llvm/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 { |