qspiders - memory (jvm architecture)

7
JVM architecture By, Vikas S Kumar Software Engineer

Upload: qspiders-software-testing-training-institute

Post on 16-Apr-2017

164 views

Category:

Education


2 download

TRANSCRIPT

Page 1: QSpiders - Memory (JVM architecture)

JVM architecture

By,Vikas S KumarSoftware Engineer

Page 2: QSpiders - Memory (JVM architecture)

JVM architecture

Page 3: QSpiders - Memory (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

Page 4: QSpiders - Memory (JVM architecture)

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)]

Page 5: QSpiders - Memory (JVM architecture)

• 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

Page 6: QSpiders - Memory (JVM architecture)

• 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

Page 7: QSpiders - Memory (JVM architecture)

• 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