Memory Leak in Thread Cleanup (jemalloc 4.0.4)
cferris at google.com
Thu Feb 11 14:33:48 PST 2016
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) \
tsd->state = tsd_state_purgatory;
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:
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jemalloc-discuss