Re:Memory Safety Is Merely Table Stakes
by andreasmetsala on Friday June 27, 2025 @07:50AM
(#44396029)
Why do Java developers still have to tune stuff like that?
Re:Memory Safety Is Merely Table Stakes
by frollogaston on Tuesday July 01, 2025 @09:06PM
(#44439368)
Before I even went on my rant, I was guessing there's just some confusing default like this but there's also some historical reason why it's like that.
Java is also fairly greedy with memory by default. It likes to grow the heap and then hold onto that memory unless 70% of the heap is free after a collection. The ratios used to grow and shrink the heap can be tuned with MinHeapFreeRatio and MaxHeapFreeRatio.