Allow dallocx and sdallocx after tsd destruction.

After a thread turns into purgatory / reincarnated state, still allow dallocx
and sdallocx to function normally.
This commit is contained in:
Qi Wang
2019-12-17 11:57:08 -08:00
committed by Qi Wang
parent 4afd709d1f
commit d5031ea824
2 changed files with 12 additions and 4 deletions

View File

@@ -440,4 +440,10 @@ tsdn_rtree_ctx(tsdn_t *tsdn, rtree_ctx_t *fallback) {
return tsd_rtree_ctx(tsdn_tsd(tsdn));
}
static inline bool
tsd_state_nocleanup(tsd_t *tsd) {
return tsd_state_get(tsd) == tsd_state_reincarnated ||
tsd_state_get(tsd) == tsd_state_minimal_initialized;
}
#endif /* JEMALLOC_INTERNAL_TSD_H */