Whenever the Java virtual machine has executed any program, then it requires more memory to store several things, including like bytecodes and other information it extracts from loaded class files, parameters to the methods, intermediate results of computations, returns values, objects of the program instantiate, and local variables. Where JVM has managed memory allocation for the ongoing programs.
There are some memory areas for Java Virtual Machine like as -
A). Stack Area
B). Heap Area
C). Method Area
D). Native Method(Stack)
E). PC Registers