Classes are loaded to Heap Memory or non heap memory(permanent space)?
864862May 27 2011 — edited May 30 2011Hi,
Please tell me to which memory are the classes that I create are loaded. I know that the objects are created in the heap memory, but not clear on where the actual class file is loaded. I read in http://download.oracle.com/javase/1.5.0/docs/guide/management/jconsole.html that "Non-heap memory includes a method area shared among all threads and memory required for the internal processing or optimization for the JVM. It stores per-class structures such as a runtime constant pool, field and method data, and the code for methods and constructors". Does this mean the classes are loaded in non Heap memory?
I am asking this because, I got a thread dump from IBM websphere and opened it using IBM Thread and Monitor Dump Analyser, then i found that there was a line saying *'Number of Loaded Classes in Heap Memory: 30,510' and 'Number of Class Loaders in Heap Memory:1,769'*.
So after seeing both of this, i am in a doubt whether the class file is loaded into heap memory or non heap memory. Please help me with this
Thanks
Soorej
Edited by: user13555666 on May 26, 2011 11:48 PM