One, memory use
Second, Java Runtime data regions
1. Program Counter:
The line number prompt for the byte code executed by the current thread.
2. Java Virtual machine stack:
Thread private, the same as the thread life cycle, save the base data type, if the thread requested a stack depth greater than the virtual machine allowed depth, will throw stackoverflowerror, if the extension can not request enough memory will throw OutOfMemoryError.
3. Local method Stack:
Similar to the role of the virtual machine stack, it is a native method service for virtual machines, and throws Stackoverflowerror and OutOfMemoryError exceptions
4. Java heap:
It is an area shared by each thread that holds an instance of the object. Java heap is the main area of Java Memory Manager (GC) management
5. Method Area:
Areas shared by each thread for storage: class information, constants, static variables, compiled code, and so on.
6, the operation of constant-rate pool:
Part of the method area
Java Program Memory usage