Architecture of jvm
-------------------
ClassLoaderSubSystem
--------------------
A ClassLoaderSubSystem will load .class file from hard disk to ram.
A jvm consists the following run time memory areas
i)MethodArea.
ii)Heap.
iii)Stack.
iv)Counter.
v)NativeMethodStack.
MethodArea
----------
It consists of class code including static variables,static methods.
Memory for static variables is allocated in MethodArea.
heap
----
heap is memory area where objects are placed.
Instance variable exists inside object.
stack
-----
stack is a memory area where methods are executed.
Local variables come to life in stack and die in stack.
Memory for local variables is allocated at the time of executing method in stack,local variables are deleted from stack at the time of method unloading once the exection of method is completed.
counter
-------
A counter consists of address of next instruction to be executed by jvm.
NativeMethodStack
-----------------
Native methods are executed from a memory area called NativeMethodStack.
Native method
-------------
Methods other than java like c,cpp,python etc.
----is the memory where class code is placed.
----is the memory where objects are placed.
----is the memory where methods are executed.
----consists of next instruction to be fetched.
----is the memory where native methods are executed.
-------------------
ClassLoaderSubSystem
--------------------
A ClassLoaderSubSystem will load .class file from hard disk to ram.
A jvm consists the following run time memory areas
i)MethodArea.
ii)Heap.
iii)Stack.
iv)Counter.
v)NativeMethodStack.
MethodArea
----------
It consists of class code including static variables,static methods.
Memory for static variables is allocated in MethodArea.
heap
----
heap is memory area where objects are placed.
Instance variable exists inside object.
stack
-----
stack is a memory area where methods are executed.
Local variables come to life in stack and die in stack.
Memory for local variables is allocated at the time of executing method in stack,local variables are deleted from stack at the time of method unloading once the exection of method is completed.
counter
-------
A counter consists of address of next instruction to be executed by jvm.
NativeMethodStack
-----------------
Native methods are executed from a memory area called NativeMethodStack.
Native method
-------------
Methods other than java like c,cpp,python etc.
----is the memory where class code is placed.
----is the memory where objects are placed.
----is the memory where methods are executed.
----consists of next instruction to be fetched.
----is the memory where native methods are executed.
No comments:
Post a Comment