forked from OSchip/llvm-project
mallinfo is not available on sun apparently :(
llvm-svn: 4537
This commit is contained in:
parent
5d606a09ff
commit
203be1a568
|
@ -71,13 +71,18 @@ static TimeRecord getTimeRecord() {
|
|||
perror("getrusage call failed: -time-passes info incorrect!");
|
||||
}
|
||||
|
||||
struct mallinfo MI = mallinfo();
|
||||
|
||||
TimeRecord Result;
|
||||
Result.Elapsed = T.tv_sec + T.tv_usec/1000000.0;
|
||||
Result.UserTime = RU.ru_utime.tv_sec + RU.ru_utime.tv_usec/1000000.0;
|
||||
Result.SystemTime = RU.ru_stime.tv_sec + RU.ru_stime.tv_usec/1000000.0;
|
||||
|
||||
#ifndef __sparc__
|
||||
struct mallinfo MI = mallinfo();
|
||||
Result.MaxRSS = MI.uordblks;
|
||||
#else
|
||||
Result.MaxRSS = 0;
|
||||
#endif
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,13 +71,18 @@ static TimeRecord getTimeRecord() {
|
|||
perror("getrusage call failed: -time-passes info incorrect!");
|
||||
}
|
||||
|
||||
struct mallinfo MI = mallinfo();
|
||||
|
||||
TimeRecord Result;
|
||||
Result.Elapsed = T.tv_sec + T.tv_usec/1000000.0;
|
||||
Result.UserTime = RU.ru_utime.tv_sec + RU.ru_utime.tv_usec/1000000.0;
|
||||
Result.SystemTime = RU.ru_stime.tv_sec + RU.ru_stime.tv_usec/1000000.0;
|
||||
|
||||
#ifndef __sparc__
|
||||
struct mallinfo MI = mallinfo();
|
||||
Result.MaxRSS = MI.uordblks;
|
||||
#else
|
||||
Result.MaxRSS = 0;
|
||||
#endif
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue