[llvm-commits] CVS: llvm/lib/Support/Timer.cpp
Jeff Cohen
jeffc at jolt-lang.org
Sat Jan 8 12:16:09 PST 2005
Changes in directory llvm/lib/Support:
Timer.cpp updated: 1.40 -> 1.41
---
Log message:
Use size_t instead of long to represent memory usage. long is 32 bits
on 64-bit Windows.
---
Diffs of the changes: (+5 -5)
Index: llvm/lib/Support/Timer.cpp
diff -u llvm/lib/Support/Timer.cpp:1.40 llvm/lib/Support/Timer.cpp:1.41
--- llvm/lib/Support/Timer.cpp:1.40 Sat Jan 8 13:31:31 2005
+++ llvm/lib/Support/Timer.cpp Sat Jan 8 14:15:57 2005
@@ -93,15 +93,15 @@
}
}
-static inline long getMemUsage() {
+static inline size_t getMemUsage() {
if (TrackSpace)
- return (long)sys::Process::GetMallocUsage();
+ return sys::Process::GetMallocUsage();
return 0;
}
struct TimeRecord {
double Elapsed, UserTime, SystemTime;
- long MemUsed;
+ size_t MemUsed;
};
static TimeRecord getTimeRecord(bool Start) {
@@ -111,7 +111,7 @@
sys::TimeValue user(0,0);
sys::TimeValue sys(0,0);
- long MemUsed = 0;
+ size_t MemUsed = 0;
if (Start) {
sys::Process::GetTimeUsage(now,user,sys);
MemUsed = getMemUsage();
@@ -171,7 +171,7 @@
/// currently active timers, which will be printed when the timer group prints
///
void Timer::addPeakMemoryMeasurement() {
- long MemUsed = getMemUsage();
+ size_t MemUsed = getMemUsage();
for (std::vector<Timer*>::iterator I = ActiveTimers.begin(),
E = ActiveTimers.end(); I != E; ++I)
More information about the llvm-commits
mailing list