Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why Continuations Are Coming to Java. Parent comment
BTW, I studied a little deeper, Java actually commits the stack memory upon thread creation.
The memory distribution of java process may be seen using jcmd <pid> VM.native_memory as suggested here http://xmlandmore.blogspot.com/2014/09/jdk-8-thread-stack-si...
But due to Linux memory overcommit this memory is not really allocated.
I've managed to create 127000 Java threads on my machine, and the resident memory of this process, as shown by `top` is 2,167G ~ 17k per thread.
If I disable memory overcommit, only around 32000 threads are created.
BTW, I studied a little deeper, Java actually commits the stack memory upon thread creation.
The memory distribution of java process may be seen using jcmd <pid> VM.native_memory as suggested here http://xmlandmore.blogspot.com/2014/09/jdk-8-thread-stack-si...
But due to Linux memory overcommit this memory is not really allocated.
I've managed to create 127000 Java threads on my machine, and the resident memory of this process, as shown by `top` is 2,167G ~ 17k per thread.
If I disable memory overcommit, only around 32000 threads are created.