| 686 | } |
| 687 | |
| 688 | static tcache_t * |
| 689 | tcaches_elm_remove(tsd_t *tsd, tcaches_t *elm, bool allow_reinit) { |
| 690 | malloc_mutex_assert_owner(tsd_tsdn(tsd), &tcaches_mtx); |
| 691 | |
| 692 | if (elm->tcache == NULL) { |
| 693 | return NULL; |
| 694 | } |
| 695 | tcache_t *tcache = elm->tcache; |
| 696 | if (allow_reinit) { |
| 697 | elm->tcache = TCACHES_ELM_NEED_REINIT; |
| 698 | } else { |
| 699 | elm->tcache = NULL; |
| 700 | } |
| 701 | |
| 702 | if (tcache == TCACHES_ELM_NEED_REINIT) { |
| 703 | return NULL; |
| 704 | } |
| 705 | return tcache; |
| 706 | } |
| 707 | |
| 708 | void |
| 709 | tcaches_flush(tsd_t *tsd, unsigned ind) { |
no test coverage detected