[llvm-commits] CVS: llvm/include/llvm/Support/Timer.h

Jeff Cohen jeffc at jolt-lang.org
Sat Jan 8 12:16:09 PST 2005



Changes in directory llvm/include/llvm/Support:

Timer.h updated: 1.13 -> 1.14
---
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/include/llvm/Support/Timer.h
diff -u llvm/include/llvm/Support/Timer.h:1.13 llvm/include/llvm/Support/Timer.h:1.14
--- llvm/include/llvm/Support/Timer.h:1.13	Wed Sep  1 17:55:35 2004
+++ llvm/include/llvm/Support/Timer.h	Sat Jan  8 14:15:57 2005
@@ -36,9 +36,9 @@
   double Elapsed;        // Wall clock time elapsed in seconds
   double UserTime;       // User time elapsed
   double SystemTime;     // System time elapsed
-  long   MemUsed;        // Memory allocated (in bytes)
-  long   PeakMem;        // Peak memory used
-  long   PeakMemBase;    // Temporary for peak calculation...
+  size_t MemUsed;        // Memory allocated (in bytes)
+  size_t PeakMem;        // Peak memory used
+  size_t PeakMemBase;    // Temporary for peak calculation...
   std::string Name;      // The name of this time variable
   bool Started;          // Has this time variable ever been started?
   TimerGroup *TG;        // The TimerGroup this Timer is in.
@@ -50,8 +50,8 @@
 
   double getProcessTime() const { return UserTime+SystemTime; }
   double getWallTime() const { return Elapsed; }
-  long getMemUsed() const { return MemUsed; }
-  long getPeakMem() const { return PeakMem; }
+  size_t getMemUsed() const { return MemUsed; }
+  size_t getPeakMem() const { return PeakMem; }
   std::string getName() const { return Name; }
 
   const Timer &operator=(const Timer &T) {






More information about the llvm-commits mailing list