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.
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) {
/// allocated space.
/// @throws nothing
/// @brief Return process memory usage.
- static uint64_t GetMallocUsage();
+ static size_t GetMallocUsage();
/// This static function will return the total memory usage of the
/// process. This includes code, data, stack and mapped pages usage. Notei
/// that the value returned here is not necessarily the Running Set Size,
/// it is the total virtual memory usage, regardless of mapped state of
/// that memory.
- static uint64_t GetTotalMemoryUsage();
+ static size_t GetTotalMemoryUsage();
/// This static function will set \p user_time to the amount of CPU time
/// spent in user (non-kernel) mode and \p sys_time to the amount of CPU
}
}
-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) {
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();
/// 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)
static char* som = reinterpret_cast<char*>(::sbrk(0));
#endif
-uint64_t
+size_t
Process::GetMallocUsage()
{
#if defined(HAVE_MALLINFO)
#endif
}
-uint64_t
+size_t
Process::GetTotalMemoryUsage()
{
#if defined(HAVE_MALLINFO)
static char* som = reinterpret_cast<char*>(::sbrk(0));
#endif
-uint64_t
+size_t
Process::GetMallocUsage()
{
#if defined(HAVE_MALLINFO)
#endif
}
-uint64_t
+size_t
Process::GetTotalMemoryUsage()
{
#if defined(HAVE_MALLINFO)
return PageSize;
}
-uint64_t
+size_t
Process::GetMallocUsage()
{
_HEAPINFO hinfo;
return size;
}
-uint64_t
+size_t
Process::GetTotalMemoryUsage()
{
PROCESS_MEMORY_COUNTERS pmc;
return PageSize;
}
-uint64_t
+size_t
Process::GetMallocUsage()
{
_HEAPINFO hinfo;
return size;
}
-uint64_t
+size_t
Process::GetTotalMemoryUsage()
{
PROCESS_MEMORY_COUNTERS pmc;