Native Memory Leak
Kirk Pepperdine
kirk.pepperdine at gmail.com
Fri Feb 9 09:25:54 UTC 2018
> On Feb 9, 2018, at 10:15 AM, Andrew Haley <aph at redhat.com> wrote:
>
> On 09/02/18 08:10, Kirk Pepperdine wrote:
>> These will be cleaned up by finalization.
>
> If you're lucky. As discussed at some length here, once something ends up
> in the old generation it can be stuck there for a very long time, and
> maybe never be collected.
True enough but on the first collection of tenured the file handles will be returned to the OS and the memory should be recovered meaning that over the long run, native usage should stabilize. If it doesn’t, two back to back calls to System.gc() should give you a hint if this is an issue.
What I see more frequently is anon blocks (pmap) accumulating as they are for some reason, not being reused and not being reclaimed. Generally this happens if you churn through threads at a significant rate.
Kind regards,
Kirk Pepperdine
More information about the hotspot-dev
mailing list