Java Memory Footprint -
It refers to the amount to memory(RAM) a Java Program uses or references while running.
In Java, Memory Footprint is mainly runtime environment in the form of JVM ,which is loaded indirectly when a Java application is launched.
Now to calculate it?
JDK provides 2 tools to calculate it.
1. jconsole.exe
2. jvisualvm.exe
We can also use Task Manager to find approx memory used in Memory column.
Prerequisite - Run your java application.(Eg.Simple Java Program with main())
How to use jconsole?
1. Run jconsole.exe and you will get jconsole window popup.
2. Click on connect button
3. Then choose your Java Application.
We can have view of -
1. How much memory is consumed? - Heap ,Non-Heap
2. How many threads are running ?
3. How many classes are loaded?
and other memory related info.
** Note-
By default how many JVM core thread runs when we run a Java Program?
1. Attach Listener - It starts when first attach request occurs to JVM.
2. Signal Dispatcher -It starts when OS pass signal to JVM for appropriate Handler.
3. Finalizer - This Thread calls Finalize() method.
4.Reference Handler - This is high priority thread for pending references.
5.Main - This thread calls main() method.
It refers to the amount to memory(RAM) a Java Program uses or references while running.
In Java, Memory Footprint is mainly runtime environment in the form of JVM ,which is loaded indirectly when a Java application is launched.
Now to calculate it?
JDK provides 2 tools to calculate it.
1. jconsole.exe
2. jvisualvm.exe
We can also use Task Manager to find approx memory used in Memory column.
Prerequisite - Run your java application.(Eg.Simple Java Program with main())
How to use jconsole?
1. Run jconsole.exe and you will get jconsole window popup.
2. Click on connect button
3. Then choose your Java Application.
We can have view of -
1. How much memory is consumed? - Heap ,Non-Heap
2. How many threads are running ?
3. How many classes are loaded?
and other memory related info.
** Note-
By default how many JVM core thread runs when we run a Java Program?
1. Attach Listener - It starts when first attach request occurs to JVM.
2. Signal Dispatcher -It starts when OS pass signal to JVM for appropriate Handler.
3. Finalizer - This Thread calls Finalize() method.
4.Reference Handler - This is high priority thread for pending references.
5.Main - This thread calls main() method.
No comments:
Post a Comment