how much memory is allocated to jvm process
total memory allocated to the jvm process is equal to the total heap, stack, native heap. i know there are commands for setting the minimum and maximum size limits on the heap.
how about the total memory allocated to the jvm process, is there a limit on that or would it keep on increasing as the number of threads getting created increases.
if there is no limit on the number of threads and since a new stack is created when a new thread is created, would this cause the jvm to keep on increasing its size till there is no more memory left in the RAM?
The total heap. New threads use heap memory. You'll OOME if you have too many of them. Try it?
From what I know it's so. Thread stack is allocated in JVM stack and OS specific.
You can use -Xss to control the default stack size but not its upper limit.
Interesting articles
http://www.onkarjoshi.com/blog/209/using-xss-to-adjust-java-default-thread-stack-size-to-save-memory-and-prevent-stackoverflowerror/
http://blog.codecentric.de/en/2010/01/the-java-memory-architecture-1-act/
http://book.javanb.com/java-threads-3rd/jthreads3-CHP-13-SECT-6.html
链接地址: http://www.djcxy.com/p/82740.html上一篇: 堆栈框架,方法调用和垃圾收集
下一篇: 多少内存分配给jvm进程