I'm looking for a way to report the memory usage of my process. I'd like to do something like:
Is there a way to do this independent of the operating system? If not, I'm looking for ways to do that on SunOS, Linux and Windows.Code:std::cout << "memory usage at point xyz: " << GetMyMemoryUsage() << std::endl;
Further it would be interesting to report which part of the process is in main memory and how much is swapped out.