qspiders - memory (jvm architecture)
TRANSCRIPT
JVM architecture
By,Vikas S KumarSoftware Engineer
JVM architecture
What is class file……?• When the .java files are compiled we get .class files, these
are called as class file• [.class file is also called as byte code]• Our JVM can understand only .class file (or byte code)• [Byte-code will also increase the security in java]• For each class in a file there will be separate .class file• The class loader loads the .class file into memory
What class loader does….?
• The class loader loads the class into memory [.class]
• The classes are loaded into memory when the call is made to any of his members
• [Class members are - methods(static or instance) , constructors, variables(static or instance)]
• Method area– It is the place were all the methods are saved.– All instance methods are stored in this area–Methods are taken from this region to execute
• Stack region– It is one of the major part of memory– It is the place were the method execution takes place–Methods gets executed in the method block present in
stack region– All the local members are stored in this region
• Heap area– Heap is also one of the major part of memory– It is the place all the objects of the class are stored– It contains String pool and static pool– String objects are stored in string pool– All static members are stored in static pool
• PC-register – It is a register memory– It is used to store the information about the next instruction
which need to be executed– Such that it keep a track each instruction which need to be
executed
• Native method area– It is the place where the native programming language
code is stored.– The native programming language code might be like
C, CPP, C# etc– To execute these code we need the help of Native
method library, were our JVm take help of this library