http://blog.csdn.net/decorator2015/article/details/50914479
To set the virtual machine parameters step in the Debug tab of Eclipse
1,run->debug Configurations->java Application
2. Select a project that has been written
3,ARGUMENTS->VM Arguments
4, the memory parameters of the virtual machine can be set in the VM arguments
5, after the setup is complete, apply->debug
6, the process is over
Write it in the back.
1, the heap is a storage object instance, that is, the class is written in the heap memory allocation; Set the size of the heap:-xmx20m ( maximum),-xms20m(minimum).
2, the stack is to store local variables, operations stack, dynamic link, method exit (all in the stack frame), when the method is called, the stack frame is created; Sets the size of the stack:-xss128k.
3, the method area is the information that holds class, such as Class name, access modifier, constant pool, field description, method description, and so on. In addition, the run-time constant pool belongs to the method area, that is, storing constants, static constants, etc., set the method area size,-xx:permsize=10m, and-xx:maxpermsize=10m.
4, local direct memory ; set local direct memory size:-xx:maxdirectmemorysize(the default is the same as the value of-XMX).
Turn: Set virtual machine parameters in the Debug tab of Eclipse