[llvm-commits] CVS: llvm/lib/Support/Timer.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Jun 17 14:55:04 PDT 2003
Changes in directory llvm/lib/Support:
Timer.cpp updated: 1.18 -> 1.19
---
Log message:
Put ifdefs around use of malloc.h/mallinfo, which isn't available on FreeBSD.
---
Diffs of the changes:
Index: llvm/lib/Support/Timer.cpp
diff -u llvm/lib/Support/Timer.cpp:1.18 llvm/lib/Support/Timer.cpp:1.19
--- llvm/lib/Support/Timer.cpp:1.18 Fri Jun 6 17:13:01 2003
+++ llvm/lib/Support/Timer.cpp Tue Jun 17 14:54:00 2003
@@ -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 @@
}
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 {
More information about the llvm-commits
mailing list