Part 5: JVM's virtual machine stack and local method stack overflow, method area and runtime constant pool overflow, native direct memory overflow

1. Virtual machine stack and native method stack overflow
1. Set the native method stack size
-Xoss
Note: In fact, setting the above parameters is invalid, and the local method stack size can only be determined by the -Xss parameter.
2. Two exceptions (the java virtual machine specification is described below)
If the stack depth requested by the thread exceeds the maximum depth allowed by the virtual machine, a StackOverflowError will be thrown.
If the virtual machine stack cannot get enough memory space when applying for expansion space, an OutOfMemoryError will be thrown.
2. Method area and runtime constant pool overflow
The method area is also assigned to the permanent generation, and the overflow of the permanent generation has the following situations:
1. Dynamically generate a large number of classes
2. A large number of jsp and dynamically generated jsp.
3. Direct memory overflow of the machine
DirectoryMemory
The -XX:MaxDirectMemorySize parameter specifies its size. If it is not specified, the default is the same as the maximum value of the java heap (specified by -Xmx).

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324776152&siteId=291194637