DebuggingProgramJava heap space is always insufficient. Many methods on the Internet to increase JVM memory, such as modifying Tomcat startup scripts and environment variables, are ineffective.
Why is it invalid.
Create an observation webpage, Mem. jsp
-
- <B>Mem</B><BR>
-
- Total:<% = Runtime. getruntime (). totalmemory () %>Free:<% = Runtime. getruntime (). freememory () %>MAX:<% = Runtime. getruntime (). maxmemory () %>
-
- <HR>
-
-
After running, it is found that the maximum JVM memory is 64 MB, and more than 30 mb is used after the program starts.
You can modify the environment variables in run dialog. Unfortunately, the result observed in MEM. jsp is still 64 MB.
Note that there is an arguments option, with a total of VM arugements. The setting is successful!
The value D before the parameter indicates that the parameter is to be uploaded to the VM.