| 20 | }; |
| 21 | |
| 22 | bool |
| 23 | bin_init(bin_t *bin) { |
| 24 | if (malloc_mutex_init(&bin->lock, "bin", WITNESS_RANK_BIN, |
| 25 | malloc_mutex_rank_exclusive)) { |
| 26 | return true; |
| 27 | } |
| 28 | bin->slabcur = NULL; |
| 29 | extent_heap_new(&bin->slabs_nonfull); |
| 30 | extent_list_init(&bin->slabs_full); |
| 31 | if (config_stats) { |
| 32 | memset(&bin->stats, 0, sizeof(bin_stats_t)); |
| 33 | } |
| 34 | return false; |
| 35 | } |
| 36 | |
| 37 | void |
| 38 | bin_prefork(tsdn_t *tsdn, bin_t *bin) { |
no test coverage detected