Hacker News new | ask | show | jobs
by jim33442 103 days ago
Java takes flags for min/initial/max memory that, as a strict law of nature, are always wrong the first time you try. And it holds onto unused memory unless you pass another flag. Idk exactly why there's no reasonable default for that, but probably cause it's in a VM. No other language has this problem.
1 comments

It does give back memory nowadays.

And it's not really a VM in that sense of the word. It's a runtime, Go also has such a runtime it's just bundled.

The Java "compiled" code isn't a native binary like in Go, it really does run in a VM. I honestly don't know if that's why they handle memory differently though.