On Feb 11, 2016, at 2:33 PM, Christopher Ferris <[email protected]> wrote:
> It appears, that under certain circumstances, the arenas_cache can be leaked
> when shutting down a thread.
>
> Specifically, in tsd.c (function tsd_cleanup), this code:
>
> #define O(n, t) \
> n##_cleanup(tsd);
> MALLOC_TSD
> #undef O
> tsd->state = tsd_state_purgatory;
> tsd_set(tsd);
> break;
>
>
> The cleanup part can wind up creating an arenas_cache, then the tsd_set
> clears the arenas_cache pointer, and the memory is leaked away.
>
> I added this call:
>
> arenas_cache_cleanup(tsd_get());
>
> After the undef and before the tsd->state, and the leak disappears. I'm not
> sure if there is a better way to fix this though.
>
Fix integrated:
https://github.com/jemalloc/jemalloc/commit/39f58755a7c2c5c12c9b732c17fe472c9872ab4b
Thanks,
Jason
_______________________________________________
jemalloc-discuss mailing list
[email protected]
http://www.canonware.com/mailman/listinfo/jemalloc-discuss