1.

What are the different types of memory areas allocated by the Java Virtual Machine in Java?

Answer»

The different types of memory areas allocated by the Java Virtual Machine are as follows:

  • Class(Method) Area: The Class(Method) Area maintains per-class structures such the runtime constant pool, FIELDS, method data, and method code.
  • Stack: The Java Stack is where frames are stored. It manages local variables and partial results, as WELL as invoking and RETURNING methods. Each thread has its own JVM stack, which is built concurrently with the thread. Each time a method is called, a new frame is created. When a frame's method invocation is finished, it is destroyed.
  • Program Counter (PC) Register: The address of the Java virtual machine instruction presently being executed is stored in the PC (programme counter) register.
  • Heap: This is the runtime data location where the objects' memory is allocated.
  • Native Method Stack: Each and EVERY native method used in the application is PRESENT in it.


Discussion

No Comment Found