Types of memory areas allocated by JVM
4.Program counter register
5.Native method stack
Six main types of memory areas allocated by JVM:
1. Class loader – a subsystem of JVM that is used to load class files.
2. Class (Method) Area – stores per-class structures such as the runtime constant pool, field and method data, the code for methods.
3. Heap - is the runtime data area in which objects are allocated.
4. Stack - stores frames and holds local variables and partial results. Participates in method invocation and return.
5. Program Counter (PC) Register - contains the address of the JVM instruction that is currently being executed.
6. Native Method Stack - contains all native methods used in the application.