I'm trying to get a process's memory and time usage,and here is [my code] but the memory reported is so much for such a simple app consuming almost 8500Kb. Has something I've done reported the wrong memory usage or are there other reasons?
#include "trace.h"
#include "include.h"
#include "trace.cpp"
using namespace std;
int main(int argc, const char * argv[])
{
trace t;
t.SetLimitInfo();
t.CreateProcess();
t.waitForChild();
cout<<"time usage: "<<t.getTime()<<"ms memory usage: "<<t.GetMemory()<<"kb"<<endl;
// insert code here...
// std::cout << "Hello, World!\n";
return 0;
}