Memory used is a delta between memuse at the start of the time and the
memuse at the end, thus it is signed. llvm-svn: 19904
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
// GetLibSupportInfoOutputFile - Return a file stream to print our output on.
|
||||
@@ -101,7 +100,7 @@ static inline size_t getMemUsage() {
|
||||
|
||||
struct TimeRecord {
|
||||
double Elapsed, UserTime, SystemTime;
|
||||
size_t MemUsed;
|
||||
ssize_t MemUsed;
|
||||
};
|
||||
|
||||
static TimeRecord getTimeRecord(bool Start) {
|
||||
@@ -111,7 +110,7 @@ static TimeRecord getTimeRecord(bool Start) {
|
||||
sys::TimeValue user(0,0);
|
||||
sys::TimeValue sys(0,0);
|
||||
|
||||
size_t MemUsed = 0;
|
||||
ssize_t MemUsed = 0;
|
||||
if (Start) {
|
||||
sys::Process::GetTimeUsage(now,user,sys);
|
||||
MemUsed = getMemUsage();
|
||||
|
||||
Reference in New Issue
Block a user