Calvin Powers wrote:
Is there a way for a running Java program to query the memory size of
its JVM and to query how much memory is currently used/freed? Is there

Runtime.getRuntime().totalMemory() Runtime.getRuntime().freeMemory() also Runtime.getRuntime().maxMemory(), for max JVM will allocate.

anyway to query how much physical memory is present on the machine its
running on?

Yes, but not with pure java. We use command-line programs on Linux/Solaris and native DLLs on windows.

C


-- ------------------------------------------------------------------------- Chris Merrill | http://www.webperformanceinc.com Web Performance Inc.

Website Load Testing and Stress Testing Software
-------------------------------------------------------------------------

_______________________________________________
Juglist mailing list
[email protected]
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to