News for hackers. Stuff that matters.
Re:Love It or Hate It, Java Continues to Evolve by unscaled on Monday June 17, 2019 @05:42AM (#20201288)
Except that the memory overhead for each thread is MUCH higher: the default would be 1Mb for most JVM implementation.

Yes, you can change the thread stack size, but that's a global fixed size for all threads, so you can't make it to small, or you'll risk stack overflows.

Meanwhile, Go is using dynamically growing stacks, starting at 2k.

Re:Love It or Hate It, Java Continues to Evolve by nvarsj on Monday June 17, 2019 @10:08AM (#20203088)
It doesn’t actually use 1mb. Only if the stack touches the pages will it ever allocate the physical memory. Most threads won’t use more than 16kB (the lower bound when I last tested it on x64). Still, it’s a lot larger than green threads.