For Programmers: Free Programming Magazines  


Home > Archive > Java Help > June 2005 > Object in Memory









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Object in Memory
paraiba2@yahoo.com

2005-06-10, 4:02 pm

Hi,

Is there a way to determine from within a Java app what objects are in
memory and how much memory they are using?

What kind of memory statistics are available in the JVM besides
runtime.freeMemory(), runtime.totalMemory(), and runtime.maxMemory()?

Thanks,
Dave

Chris Smith

2005-06-11, 3:58 am

<paraiba2@yahoo.com> wrote:
> Is there a way to determine from within a Java app what objects are in
> memory and how much memory they are using?


Yes. There's an entire API devoted to gathering this kind of
information, and it's called the JVMTI (before Java 1.5, it's the JVMDI
and JVMPI, but they were united in 1.5). These do require that the VM
be run in an appropriate mode to give out this information; which is
good, since we wouldn't want the VM to gather it all of the time.

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com