| 2579 | } |
| 2580 | |
| 2581 | static int |
| 2582 | arenas_create_ctl(tsd_t *tsd, const size_t *mib, size_t miblen, |
| 2583 | void *oldp, size_t *oldlenp, void *newp, size_t newlen) { |
| 2584 | int ret; |
| 2585 | extent_hooks_t *extent_hooks; |
| 2586 | unsigned arena_ind; |
| 2587 | |
| 2588 | malloc_mutex_lock(tsd_tsdn(tsd), &ctl_mtx); |
| 2589 | |
| 2590 | extent_hooks = (extent_hooks_t *)&extent_hooks_default; |
| 2591 | WRITE(extent_hooks, extent_hooks_t *); |
| 2592 | if ((arena_ind = ctl_arena_init(tsd, extent_hooks)) == UINT_MAX) { |
| 2593 | ret = EAGAIN; |
| 2594 | goto label_return; |
| 2595 | } |
| 2596 | READ(arena_ind, unsigned); |
| 2597 | |
| 2598 | ret = 0; |
| 2599 | label_return: |
| 2600 | malloc_mutex_unlock(tsd_tsdn(tsd), &ctl_mtx); |
| 2601 | return ret; |
| 2602 | } |
| 2603 | |
| 2604 | static int |
| 2605 | arenas_lookup_ctl(tsd_t *tsd, const size_t *mib, |
nothing calls this directly
no test coverage detected