Memory usage of a non persistant process

Souron

The Dark Lord
Joined
Mar 9, 2003
Messages
5,947
Location
(GMT-5)
What's the easiest way to measure the memory usage of a non persistent application?

I don't want a big download for so simple a task; I'm not trying to determine memory leaks, just usage.

In particular the applications I am testing are in java.
 
I think you can do it incode actually:
Code:
long usedMem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();

This will tell you how much memory the instance of JVM is using out of its total available, at least in theory.
 
Back
Top Bottom