Types of memory areas are allocated by JVM

Java Software Editions (Core Java or Java SE, Advanced Java or Java EE and Java ME), Java Features, Use of Java Programming, Java Environment setup, Java Syntax and Java Program Structure.
Post Reply
AyubHussain
Posts: 138
Joined: Fri Nov 23, 2018 2:48 am

Types of memory areas are allocated by JVM

Post by AyubHussain » Tue Dec 04, 2018 8:10 am

How many types of memory areas are allocated by JVM?

dsusmitha
Posts: 62
Joined: Fri Nov 23, 2018 2:51 am

Re: Types of memory areas are allocated by JVM

Post by dsusmitha » Tue Dec 04, 2018 8:11 am

Many types:

1) Class(Method) Area: Class Area stores per-class structures such as the runtime constant pool, field, method data, and the code for methods.

2) Heap: It is the runtime data area in which the memory is allocated to the objects

3) Stack: Java Stack stores frames. It holds local variables and partial results, and plays a part in method invocation and return. Each thread has a private JVM stack, created at the same time as the thread. A new frame is created each time a method is invoked. A frame is destroyed when its method invocation completes.

4) Program Counter Register: PC (program counter) register contains the address of the Java virtual machine instruction currently being executed.

5) Native Method Stack: It contains all the native methods used in the application.

Post Reply

Return to “Java Programming Fundamentals”