diff options
author | Christopher Ferris <cferris@google.com> | 2015-08-21 19:23:06 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2015-08-21 19:33:17 (GMT) |
commit | 45e9f66c280e1ba8bebf7bed387a43bc9e45536d (patch) | |
tree | d1bdea995e09f9d147fde2bce44f0bb1e3237b78 /src/jemalloc.c | |
parent | b5c2a347d7cbf1154181ccb3adc599c8bd2094c9 (diff) | |
download | jemalloc-45e9f66c280e1ba8bebf7bed387a43bc9e45536d.zip jemalloc-45e9f66c280e1ba8bebf7bed387a43bc9e45536d.tar.gz jemalloc-45e9f66c280e1ba8bebf7bed387a43bc9e45536d.tar.bz2 |
Fix arenas_cache_cleanup().
Fix arenas_cache_cleanup() to handle allocation/deallocation within the
application's thread-specific data cleanup functions even after
arenas_cache is torn down.
Diffstat (limited to 'src/jemalloc.c')
-rw-r--r-- | src/jemalloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c index ed7863b..0361913 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -649,8 +649,12 @@ arenas_cache_cleanup(tsd_t *tsd) arena_t **arenas_cache; arenas_cache = tsd_arenas_cache_get(tsd); - if (arenas_cache != NULL) + if (arenas_cache != NULL) { + bool *arenas_cache_bypassp = tsd_arenas_cache_bypassp_get(tsd); + *arenas_cache_bypassp = true; + tsd_arenas_cache_set(tsd, NULL); a0dalloc(arenas_cache); + } } void |