← Back to context

Comment by xxs

18 hours ago

Java has a quite strict max heap setting, it's very uncommon to let it allocate up to 25% of the system memory (the default). It won't grow past that point, though.

Baring bugs/native leaks - Java has a very predictable memory allocation.

we aren't talking about allocation, tho

we are talking about DEallocation

  • it's a reply to:

    "To an outsider, that looks like the JVM heap just steadily growing, which is easy to mistake for a memory leak."

    I cut the part that it's possible to make JVM return memory heap after compaction but usually it's not done, i.e. if something grew once, it's likely to do it again.