getting memory heap info

Hello.

I don't know if it's the rigth forum for posting this question, neverthless, I need to get some memory heap information...

But not only the "total" given by Runtime.totalMemory(): I want to get the allocated memory into "eden", "survivor", "tenured", and "perm" spaces. Just like in the "Memory" sheet of JConsole.

Any idea?

Thanks.

[373 byte] By [El_Duendea] at [2007-10-3 11:54:36]
# 1

The eden, survivor, tenured and other memory spaces are represented as memory pools in the java.lang.management API (see MemoryPoolMXBean interface).

You can also reference the sample source in <JDK>/demo/management/ of the use of the java.lang.management API. The documentation of the Java SE monitoring and management is at:

http://java.sun.com/javase/6/docs/technotes/guides/management/index.html

Mandy

mandy_kochunga at 2007-7-15 14:29:26 > top of Java-index,Core,Monitoring & Management...
# 2
thx mandy. It seems to work fine.
El_Duendea at 2007-7-15 14:29:26 > top of Java-index,Core,Monitoring & Management...